net.sf.crispy.impl
Class ServiceManager

java.lang.Object
  extended bynet.sf.crispy.impl.ServiceManager
All Implemented Interfaces:
IServiceManager

public class ServiceManager
extends java.lang.Object
implements IServiceManager

Create Services for different kind of Services, how XML-RPC, EJB (JNDI), ... or a simple local invocation from a Java-Object (Factory-Pattern). It is the central class (it is a start point).

Author:
Linke

Field Summary
static boolean DEBUG_MODE_ON
          extra debug mode for more information by problems
 
Constructor Summary
ServiceManager()
           
ServiceManager(java.lang.Class pvServiceInterface, java.lang.Class pvServiceClass)
           
ServiceManager(java.util.Properties pvProperties)
           
ServiceManager(PropertiesLoader pvPropertiesLoader)
           
 
Method Summary
 void addInterceptor(Interceptor pvInterceptor)
           
 void addInterceptorFilter(InterceptorFilter pvInterceptorFilter)
           
 java.lang.Object createService(java.lang.Class pvServiceInterface)
          Create a Proxy-Instance to the Service-Interface for synchronous invocation.
 java.lang.Object createService(java.lang.Class pvServiceInterface, AsynchronousCallback pvAsynchronousCallback, java.lang.String[] pvMethodFilter, int pvMaxSizeOfThreads)
          Create a Proxy-Object for invocation and do invocation asynchronous.
 AsynchronousCallback getAsynchronousCallback(java.lang.Class pvServiceInterface)
           
 Interceptor getInterceptorByPos(int pvPos)
           
 int getInterceptorFilterSize()
           
 java.util.Iterator getInterceptorIterator()
           
 int getInterceptorSize()
           
 Modifier getModifier()
           
 java.lang.String getProperty(java.lang.String pvKey)
           
 java.util.Iterator getPropertyKeys()
           
 java.lang.Class getTransporterClassByServiceInterface(java.lang.Class pvServiceInterface)
           
protected  void init(java.util.Properties pvProperties)
           
 boolean isInvocationAsynchronous(java.lang.Class pvServiceInterface)
          Are calls asynchronous.
 void removeAllInterceptors()
           
 void removeAsynchronousCallback(java.lang.Class pvServiceInterface)
          Remove asynchronous callback interface.
 Interceptor removeInterceptorByPos(int pvPos)
           
 InterceptorFilter removeInterceptorFilterByPos(int pvPos)
           
 void setModifier(Modifier pvModifier)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_MODE_ON

public static boolean DEBUG_MODE_ON
extra debug mode for more information by problems

Constructor Detail

ServiceManager

public ServiceManager(PropertiesLoader pvPropertiesLoader)

ServiceManager

public ServiceManager(java.lang.Class pvServiceInterface,
                      java.lang.Class pvServiceClass)

ServiceManager

public ServiceManager(java.util.Properties pvProperties)

ServiceManager

public ServiceManager()
Method Detail

init

protected final void init(java.util.Properties pvProperties)

getInterceptorIterator

public final java.util.Iterator getInterceptorIterator()

getInterceptorByPos

public final Interceptor getInterceptorByPos(int pvPos)
Specified by:
getInterceptorByPos in interface IServiceManager

getInterceptorSize

public final int getInterceptorSize()
Specified by:
getInterceptorSize in interface IServiceManager

removeInterceptorByPos

public final Interceptor removeInterceptorByPos(int pvPos)
Specified by:
removeInterceptorByPos in interface IServiceManager

removeAllInterceptors

public final void removeAllInterceptors()

addInterceptor

public final void addInterceptor(Interceptor pvInterceptor)
Specified by:
addInterceptor in interface IServiceManager

getInterceptorFilterSize

public final int getInterceptorFilterSize()

removeInterceptorFilterByPos

public final InterceptorFilter removeInterceptorFilterByPos(int pvPos)

addInterceptorFilter

public final void addInterceptorFilter(InterceptorFilter pvInterceptorFilter)

getModifier

public final Modifier getModifier()
Specified by:
getModifier in interface IServiceManager

setModifier

public final void setModifier(Modifier pvModifier)
Specified by:
setModifier in interface IServiceManager

getProperty

public final java.lang.String getProperty(java.lang.String pvKey)
Specified by:
getProperty in interface IServiceManager

getPropertyKeys

public final java.util.Iterator getPropertyKeys()
Specified by:
getPropertyKeys in interface IServiceManager

createService

public java.lang.Object createService(java.lang.Class pvServiceInterface)
Create a Proxy-Instance to the Service-Interface for synchronous invocation.

Specified by:
createService in interface IServiceManager
Parameters:
pvServiceInterface - Service-Interface
Returns:
Proxy-Object.
See Also:
IServiceManager.createService(java.lang.Class)

createService

public java.lang.Object createService(java.lang.Class pvServiceInterface,
                                      AsynchronousCallback pvAsynchronousCallback,
                                      java.lang.String[] pvMethodFilter,
                                      int pvMaxSizeOfThreads)
Create a Proxy-Object for invocation and do invocation asynchronous.

Specified by:
createService in interface IServiceManager
Parameters:
pvServiceInterface - For this Interface is created a Proxy-Object.
pvAsynchronousCallback - Hanlder for asynchronous execution.
pvMethodFilter - Only for method-names in this array are asynchronous execution
pvMaxSizeOfThreads - Max size of keeping Threads.
Returns:
Proxy-Object.
See Also:
IServiceManager.createService(java.lang.Class, net.sf.crispy.concurrent.AsynchronousCallback, java.lang.String[], int)

getTransporterClassByServiceInterface

public java.lang.Class getTransporterClassByServiceInterface(java.lang.Class pvServiceInterface)
Parameters:
pvServiceInterface - Search Service-Interface.
Returns:
Get the class from StaticProxy or Executor or null.

removeAsynchronousCallback

public void removeAsynchronousCallback(java.lang.Class pvServiceInterface)
Description copied from interface: IServiceManager
Remove asynchronous callback interface. All execution are synchronous.

Specified by:
removeAsynchronousCallback in interface IServiceManager
Parameters:
pvServiceInterface - This is apply to this service interface.

getAsynchronousCallback

public AsynchronousCallback getAsynchronousCallback(java.lang.Class pvServiceInterface)

isInvocationAsynchronous

public boolean isInvocationAsynchronous(java.lang.Class pvServiceInterface)
Description copied from interface: IServiceManager
Are calls asynchronous.

Specified by:
isInvocationAsynchronous in interface IServiceManager
Parameters:
pvServiceInterface - Test to asynchronous for this service interface.
Returns:
If asynchronous, than true, else false.


Copyright © 2005-2006 Crispy. All Rights Reserved.