|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.soda.sat.core.framework.ProxyServiceHandlerAdapter
public class ProxyServiceHandlerAdapter
ProxyServiceHandlerAdapter
is a concrete no-op
implementation of the IProxyServiceHandler
interface. It is
intended that this class be subclassed and one or two methods overridden. It
is common for a subclass to only implement the createService()
method, for example.
Constructor Summary | |
---|---|
ProxyServiceHandlerAdapter()
|
Method Summary | |
---|---|
Object |
createService()
Create the real service Object for which a proxy was
created. |
void |
postInvoke(Object service,
Method method,
Object[] args,
Throwable throwable,
Object data)
This implementation logs throwable parameter as an error if
it is not null . |
Object |
preInvoke(Object service,
Method method,
Object[] args)
A hook method that is executed before the proxy has invoked the specified Method on the specified service
Object . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyServiceHandlerAdapter()
Method Detail |
---|
public Object createService()
IProxyServiceHandler
Object
for which a proxy was
created.
createService
in interface IProxyServiceHandler
Object
.IProxyServiceHandler.createService()
public void postInvoke(Object service, Method method, Object[] args, Throwable throwable, Object data)
throwable
parameter as an error if
it is not null
.
postInvoke
in interface IProxyServiceHandler
service
- The service Object
.method
- The Method
that was invoked on the
service.args
- The arguments passed to the method.throwable
- The exception thrown by the method, or
null
.data
- Handler specific data.IProxyServiceHandler.postInvoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], java.lang.Throwable, java.lang.Object)
public Object preInvoke(Object service, Method method, Object[] args)
IProxyServiceHandler
Method
on the specified service
Object
. The Object
returned by this method is
handler-specific and will be passed into the postInvoke
method; for example, the current time in milliseconds could be returned
as a Long
, allowing the postInvoke
method to
calculate approximately how long the service method took to execute.
preInvoke
in interface IProxyServiceHandler
service
- The service Object
.method
- The Method
that will be invoked on the
service.args
- The arguments that will be passed to the method.
IProxyServiceHandler.preInvoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001, 2008 IBM Corporation and others. All Rights Reserved.