Service Invocation Tool

Service Invocation Tool provides a dynamic implementation of a Java interface by delegating method calls to providers.

Basic usage in Java

The simplest usage of SIT in Java is:

 SITConfigurer sit = new SITConfigurer();
 sit.setFacadeType(MyFacadeInterface.class);
 sit.setProvider(new MyProvider());
 sit.init();
 MyFacadeInterface facade = (MyFacadeInterface) sit.getFacade();
 // now invoke business methods on facade:
 facade.businessMethod();

SIT will automatically call businessMethod() on the provider, mapping parameters and return value in-between.

Spring configuration

A sample Spring configuration:

 <bean id="mySit" class="net.sf.sit.SITConfigurer" init-method="init">
  <property name="facadeType" value="some.facade.pkg.MyFacade" />
  <property name="providers">
   <list>
    <bean class="some.provider.pkg.Provider1" />
    <bean class="some.provider.pkg.Provider2" />
    <bean class="some.provider.pkg.Provider3" />
   </list>
  </property>
 </bean>
 <bean id="myFacade" factory-bean="mySit" factory-method="getFacade" />

This project is part of SEAF, which is hosted by Sourceforge.net.

SEAF at Sourceforge.net