FileDocCategorySizeDatePackage
HASessionState.javaAPI DocJBoss 4.2.14296Fri Jul 13 20:52:38 BST 2007org.jboss.ha.hasessionstate.interfaces

HASessionState

public interface HASessionState
Interface for services providing clustered state session availability
see
org.jboss.ha.hasessionstate.server.HASessionStateImpl
author
Sacha Labourey
version
$Revision: 57188 $

Revisions:

Fields Summary
Constructors Summary
Methods Summary
public voidcreateSession(java.lang.String appName, java.lang.Object keyId)
Share a new session state in the sub-partition of this cluster

param
appName Application name for which is state is shared
param
keyId Key identifier of the state

public org.jboss.ha.framework.interfaces.HAPartitiongetCurrentHAPartition()

public java.lang.StringgetNodeName()
Return the name of this node as used in the computations

public org.jboss.ha.hasessionstate.interfaces.PackagedSessiongetState(java.lang.String appName, java.lang.Object keyId)
Get a particular state

param
appName Application hosting the state
param
keyId Key identifier of the state
return
The state value

public org.jboss.ha.hasessionstate.interfaces.PackagedSessiongetStateWithOwnership(java.lang.String appName, java.lang.Object keyId)
Get a state and, if it is not already the case, takes its ownership (a state is always owned by a node)

param
appName Application hosting the state
param
keyId Key identifier of the state
throws
java.rmi.RemoteException Thrown if an exception occurs while getting the ownership of the state
return
The state value

public voidinit()

public voidremoveSession(java.lang.String appName, java.lang.Object keyId)
Remove a session from the sub-partition

param
appName Application hosting the state
param
keyId Key identifier of the state

public voidsetState(java.lang.String appName, java.lang.Object keyId, byte[] state)
Modifies a state already shared

param
appName Application name hosting this state
param
keyId Key identifier of the state to modify
param
state New state

public voidstart()

public voidsubscribe(java.lang.String appName, org.jboss.ha.hasessionstate.interfaces.HASessionState$HASessionStateListener listener)
Subscribe to receive notifications when objects gets modified on another node.

public voidtakeOwnership(java.lang.String appName, java.lang.Object keyId)
Take ownership of a state. Each state is owned by a node.

param
appName Application hosting the state
param
keyId Key identifier of the state
throws
java.rmi.RemoteException Trown if a communication exception occurs while asking other node to get the ownership

public voidunsubscribe(java.lang.String appName, org.jboss.ha.hasessionstate.interfaces.HASessionState$HASessionStateListener listener)