org.clazzes.remoting.beans
Class ClientHolder

java.lang.Object
  extended by org.clazzes.remoting.beans.ClientHolder

public class ClientHolder
extends java.lang.Object

This interface is implemented by thread-bound session contexts, which bind a resource to a specific client.

Author:
wglas

Constructor Summary
ClientHolder(Client client)
           
 
Method Summary
 Client getClient()
           
static ClientHolder getContext()
           
 boolean isCloseOnPassivate()
           
static void removeContext()
          Remove the client holder attached to the current thread.
 void setCloseOnPassivate(boolean closeOnPassivate)
           
static void setContext(ClientHolder holder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientHolder

public ClientHolder(Client client)
Method Detail

setContext

public static void setContext(ClientHolder holder)
Parameters:
holder - The current client holder to attach to the current thread.

getContext

public static ClientHolder getContext()
Returns:
The client holder attached to the current thread using setContext(ClientHolder).

removeContext

public static void removeContext()
Remove the client holder attached to the current thread.


getClient

public Client getClient()
Returns:
The client to which the thread-bound context belongs.

setCloseOnPassivate

public void setCloseOnPassivate(boolean closeOnPassivate)
Parameters:
closeOnPassivate - Whether to close this stream before passivating because of an I/O error.

isCloseOnPassivate

public boolean isCloseOnPassivate()
Returns:
Whether to close this stream before passivating because of an I/O error.


Copyright © 2010. All Rights Reserved.