|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemonster.surinam.routing.FullyDynamicCachingInvocationRouterImpl
public class FullyDynamicCachingInvocationRouterImpl
This is the primary interceptor for the framework; as the name implies, this InvocationRouter caches a reference to the Service and will refresh that reference in response to Service Graph reshaping activity.
| Constructor Summary | |
|---|---|
FullyDynamicCachingInvocationRouterImpl(ServiceBlock serviceBlock,
Class serviceInterface)
This is a very important constructor since it includes code that performs an initial service lookup which will be a cached reference to the invocation target. |
|
FullyDynamicCachingInvocationRouterImpl(ServiceBlock serviceBlock,
String serviceInterfaceName)
|
|
| Method Summary | |
|---|---|
String |
getInvocationTargetName()
Primarily for testing purposes, this will give us a view of the cached target. |
void |
invalidateReferences()
Since this interceptor holds a static reference to the Service, we will refresh the reference when reshaping of the Service Graph occurs. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
This signature is dictated by Java for interception. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FullyDynamicCachingInvocationRouterImpl(ServiceBlock serviceBlock,
Class serviceInterface)
throws UnknownServiceException,
UnavailableServiceException,
InvocationTargetException
serviceBlock - The Service Block that this interceptor is integrated with.serviceInterface - The service interface is the unique identifier that specifies the service we want to use.
UnknownServiceException - Thrown if we are asking for a service that is not registered.
UnavailableServiceException - Thrown if we are asking for a service that is not available.
InvocationTargetException - Thrown if there is an internal problem.
public FullyDynamicCachingInvocationRouterImpl(ServiceBlock serviceBlock,
String serviceInterfaceName)
throws UnknownServiceException,
UnavailableServiceException,
InvocationTargetException,
ClassNotFoundException
serviceBlock - The Service Block that this interceptor is integrated with.serviceInterfaceName - The service interface is the unique identifier that specifies the service we want.
UnknownServiceException - Thrown if we are asking for a service that is not registered.
UnavailableServiceException - Thrown if we are asking for a service that is not available.
InvocationTargetException - Thrown if there is an internal problem.
ClassNotFoundException - Thrown if the given class name cannot be converted to a Class object.| Method Detail |
|---|
public Object invoke(Object proxy,
Method method,
Object[] args)
throws UnknownServiceException,
InvocationTargetException,
UnavailableServiceException,
IllegalAccessException
invoke in interface InvocationHandlerproxy - This is the object upon which the original invocation was made, which we ignore.method - this is the method that we want to call.args - these are the parameters for the invocation.
UnknownServiceException - thrown if the service being retrieved is unknown to the system.
InvocationTargetException - thrown if there is a problem with the mechanics of the invocation.
UnavailableServiceException - thrown if the service is offline.
IllegalAccessException - thrown by Java if there is a security violation.public void invalidateReferences()
invalidateReferences in interface InterceptorLifecyclepublic String getInvocationTargetName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||