public class BasicServiceInvocationHandler extends Object implements InvocationHandler, ISwitchCall
Modifier and Type | Field and Description |
---|---|
static String |
PROXYTYPE_DECOUPLED
The (default) decoupled proxy type (decouples from caller thread to component thread).
|
static String |
PROXYTYPE_DIRECT
The direct proxy type (supports custom interceptors, but uses caller thread).
|
static String |
PROXYTYPE_RAW
The raw proxy type (i.e. no proxy).
|
Constructor and Description |
---|
BasicServiceInvocationHandler(IInternalAccess comp,
IServiceIdentifier sid,
Logger logger,
boolean realtime,
Cause cause,
boolean required)
Create a new invocation handler.
|
BasicServiceInvocationHandler(IInternalAccess comp,
IService service,
Logger logger,
boolean realtime,
Cause cause,
boolean required)
Create a new invocation handler.
|
BasicServiceInvocationHandler(IInternalAccess comp,
ServiceInfo service,
Logger logger,
boolean realtime,
Cause cause)
Create a new invocation handler.
|
Modifier and Type | Method and Description |
---|---|
void |
addFirstServiceInterceptor(IServiceInvocationInterceptor interceptor)
Add an interceptor.
|
static void |
addPojoServiceProxy(Object pojo,
IService proxy)
Add a service proxy.
|
void |
addServiceInterceptor(IServiceInvocationInterceptor interceptor)
Add an interceptor.
|
void |
addServiceInterceptor(IServiceInvocationInterceptor interceptor,
int pos)
Add an interceptor.
|
static IInternalService |
createDelegationProvidedServiceProxy(IInternalAccess ia,
IComponentAdapter adapter,
IServiceIdentifier sid,
RequiredServiceInfo info,
RequiredServiceBinding binding,
ClassLoader classloader,
boolean realtime)
Static method for creating a delegation service proxy for
provided service that is not offered by the component itself.
|
static IInternalService |
createProvidedServiceProxy(IInternalAccess ia,
IComponentAdapter adapter,
Object service,
String name,
Class<?> type,
String proxytype,
IServiceInvocationInterceptor[] ics,
boolean copy,
boolean realtime,
IResourceIdentifier rid,
boolean monitoring,
IResultCommand<Object,Class<?>> componentfetcher)
Static method for creating a standard service proxy for a provided service.
|
static IService |
createRequiredServiceProxy(IInternalAccess ia,
IExternalAccess ea,
IComponentAdapter adapter,
IService service,
IRequiredServiceFetcher fetcher,
RequiredServiceInfo info,
RequiredServiceBinding binding,
boolean realtime)
Static method for creating a standard service proxy for a required service.
|
boolean |
equals(Object obj)
Test if two objects are equal.
|
Object |
getDomainService()
Get the domain service.
|
IServiceInvocationInterceptor[] |
getInterceptors()
Get interceptors.
|
static IService |
getPojoServiceProxy(Object pojo)
Get the proxy of a pojo service.
|
Object |
getService()
Get the service.
|
IServiceIdentifier |
getServiceIdentifier()
Get the sid.
|
int |
hashCode()
Return the hash code.
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
A proxy method has been invoked.
|
boolean |
isRequired()
Check if the handler is for a required service proxy.
|
boolean |
isSwitchCall()
Check if a switch call should be done.
|
static void |
removePojoServiceProxy(IServiceIdentifier sid)
Remove a pojo - proxy pair.
|
void |
removeServiceInterceptor(IServiceInvocationInterceptor interceptor)
Remove an interceptor.
|
String |
toString()
Get a string representation.
|
public static final String PROXYTYPE_RAW
public static final String PROXYTYPE_DIRECT
public static final String PROXYTYPE_DECOUPLED
public BasicServiceInvocationHandler(IInternalAccess comp, IServiceIdentifier sid, Logger logger, boolean realtime, Cause cause, boolean required)
public BasicServiceInvocationHandler(IInternalAccess comp, IService service, Logger logger, boolean realtime, Cause cause, boolean required)
public BasicServiceInvocationHandler(IInternalAccess comp, ServiceInfo service, Logger logger, boolean realtime, Cause cause)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public IServiceIdentifier getServiceIdentifier()
public Object getService()
public Object getDomainService()
public void addFirstServiceInterceptor(IServiceInvocationInterceptor interceptor)
public void addServiceInterceptor(IServiceInvocationInterceptor interceptor, int pos)
public void addServiceInterceptor(IServiceInvocationInterceptor interceptor)
public void removeServiceInterceptor(IServiceInvocationInterceptor interceptor)
public IServiceInvocationInterceptor[] getInterceptors()
public boolean equals(Object obj)
public static IInternalService createProvidedServiceProxy(IInternalAccess ia, IComponentAdapter adapter, Object service, String name, Class<?> type, String proxytype, IServiceInvocationInterceptor[] ics, boolean copy, boolean realtime, IResourceIdentifier rid, boolean monitoring, IResultCommand<Object,Class<?>> componentfetcher)
public static IInternalService createDelegationProvidedServiceProxy(IInternalAccess ia, IComponentAdapter adapter, IServiceIdentifier sid, RequiredServiceInfo info, RequiredServiceBinding binding, ClassLoader classloader, boolean realtime)
public static IService createRequiredServiceProxy(IInternalAccess ia, IExternalAccess ea, IComponentAdapter adapter, IService service, IRequiredServiceFetcher fetcher, RequiredServiceInfo info, RequiredServiceBinding binding, boolean realtime)
public static void addPojoServiceProxy(Object pojo, IService proxy)
pojo
- The pojo.proxy
- The proxy.public static void removePojoServiceProxy(IServiceIdentifier sid)
sid
- The service identifier.public static IService getPojoServiceProxy(Object pojo)
pojo
- The pojo service.public boolean isSwitchCall()
isSwitchCall
in interface ISwitchCall
public boolean isRequired()
Copyright © 2013. All Rights Reserved.