|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.remoting.beans.ReturnCallbackInvocationHandler
public class ReturnCallbackInvocationHandler
This ServerInvocationHandler delegates jboss remote calls to a spring bean by intelligently discovering the service interface.
Field Summary |
---|
Fields inherited from interface org.clazzes.remoting.beans.ReturnCallbackHandler |
---|
RETURN_PROXY_GUID_PROPERTY |
Constructor Summary | |
---|---|
ReturnCallbackInvocationHandler()
|
Method Summary | |
---|---|
void |
clientTerminated(java.rmi.server.UID clientUID)
|
int |
countCallbacks(java.rmi.server.UID sessionId)
Count all callbacks of a given client. |
void |
deregisterAllCallbacks(java.rmi.server.UID sessionId)
Deregister all callbacks of a given client. |
void |
deregisterCallback(java.rmi.server.UID sessionId,
java.rmi.server.UID guid)
Deregister a single callback of a given client. |
void |
destroy()
Cleanup internal resources. |
java.util.List<java.lang.Class<?>> |
getCallbackInterfaces()
|
java.lang.String |
getCloseMethodRegex()
|
void |
initialize()
Initialize the internal state of this bean. |
java.lang.Object |
invoke(InvocationContext ctx,
java.lang.Object arg,
java.util.Map<java.lang.String,java.lang.Object> metadata)
|
boolean |
isCallbackInterface(java.lang.Class<?> iface)
|
boolean |
isInitialized()
|
java.rmi.server.UID |
registerCallback(java.rmi.server.UID sessionId,
java.lang.Class<?> iface,
java.lang.Object target)
|
void |
setCallbackInterfaces(java.util.List<java.lang.Class<?>> callbackInterfaces)
|
void |
setCloseMethodRegex(java.lang.String closeMethodRegex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReturnCallbackInvocationHandler()
Method Detail |
---|
public boolean isInitialized()
isInitialized
in interface Initializable
Initializable.initialize()
.public void initialize() throws java.lang.Exception
Initializable
initialize
in interface Initializable
java.lang.Exception
- Upon errors.public void destroy()
Destroyable
Initializable
too, the general contract is,
that after calling this method, Initializable.isInitialized()
returns
false
.
destroy
in interface Destroyable
public java.lang.Object invoke(InvocationContext ctx, java.lang.Object arg, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.lang.Throwable
invoke
in interface InvocationHandler
ctx
- The context under which the call has been issued.arg
- The argument of the call.metadata
- The metadata accompanying the remote call, which is passed to the
invocation handler. Metadata may be used to communicate authorization
information such as user/password or a session Id.
java.lang.Throwable
- Any exception raised by the call. This exception will be reported
back to the invoker as the root cause of an InvocationTargetException
.public int countCallbacks(java.rmi.server.UID sessionId)
ReturnCallbackHandler
countCallbacks
in interface ReturnCallbackHandler
sessionId
- A client session Id.
public void deregisterAllCallbacks(java.rmi.server.UID sessionId)
ReturnCallbackHandler
deregisterAllCallbacks
in interface ReturnCallbackHandler
sessionId
- A client session Id.public void clientTerminated(java.rmi.server.UID clientUID)
clientTerminated
in interface ClientTerminationListener
clientUID
- The UID of the client which has terminated.public void deregisterCallback(java.rmi.server.UID sessionId, java.rmi.server.UID guid)
ReturnCallbackHandler
deregisterCallback
in interface ReturnCallbackHandler
sessionId
- A client session Id.guid
- The GUID of the callback to be deregistered a returned by
#registerCallback(String, Class, Object)
.public boolean isCallbackInterface(java.lang.Class<?> iface)
isCallbackInterface
in interface ReturnCallbackHandler
iface
- The interface of a return value.
public java.rmi.server.UID registerCallback(java.rmi.server.UID sessionId, java.lang.Class<?> iface, java.lang.Object target)
registerCallback
in interface ReturnCallbackHandler
sessionId
- A client session Id.iface
- The interface of a service return value.target
- The proxy object to be served.
public java.util.List<java.lang.Class<?>> getCallbackInterfaces()
public void setCallbackInterfaces(java.util.List<java.lang.Class<?>> callbackInterfaces)
callbackInterfaces
- the callbackInterfaces to setpublic java.lang.String getCloseMethodRegex()
public void setCloseMethodRegex(java.lang.String closeMethodRegex)
closeMethodRegex
- the closeMethodRegex to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |