org.clazzes.remoting.beans
Class SessionContextInvocationHandler
java.lang.Object
org.clazzes.remoting.beans.SessionContextInvocationHandler
- All Implemented Interfaces:
- InvocationHandler, ClientTerminationListener
public class SessionContextInvocationHandler
- extends java.lang.Object
- implements InvocationHandler, ClientTerminationListener
An invocation handler, which manages the hibernate session attached to the current
thread.
- Author:
- wglas
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionContextInvocationHandler
public SessionContextInvocationHandler()
invoke
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
- Specified by:
invoke
in interface InvocationHandler
- Parameters:
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.
- Returns:
- The result of the operation.
- Throws:
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
.
clientTerminated
public void clientTerminated(java.rmi.server.UID clientUID)
- Specified by:
clientTerminated
in interface ClientTerminationListener
- Parameters:
clientUID
- The UID of the client which has terminated.
getReturnCallbackHandler
public ReturnCallbackHandler getReturnCallbackHandler()
- Returns:
- the returnCallbackHandler
setReturnCallbackHandler
public void setReturnCallbackHandler(ReturnCallbackHandler returnCallbackHandler)
- Parameters:
returnCallbackHandler
- the returnCallbackHandler to set
getSessionManager
public SessionManager getSessionManager()
- Returns:
- the sessionManager
setSessionManager
public void setSessionManager(SessionManager sessionManager)
- Parameters:
sessionManager
- the sessionManager to set
Copyright © 2010. All Rights Reserved.