1 22 package org.jboss.ha.hasessionstate.interfaces; 23 24 import org.jboss.ha.hasessionstate.interfaces.PackagedSession; 25 import org.jboss.ha.framework.interfaces.HAPartition; 26 27 37 38 public interface HASessionState 39 { 40 41 public void init () throws Exception ; 42 public void start () throws Exception ; 43 44 49 public interface HASessionStateListener 50 { 51 public void sessionExternallyModified (PackagedSession session); 52 } 53 57 public void subscribe (String appName, HASessionStateListener listener); 58 public void unsubscribe (String appName, HASessionStateListener listener); 59 60 public HAPartition getCurrentHAPartition (); 61 62 65 public String getNodeName (); 66 67 72 public void createSession (String appName, Object keyId); 73 79 public void setState (String appName, Object keyId, byte[] state) 80 throws java.rmi.RemoteException ; 81 82 88 public PackagedSession getState (String appName, Object keyId); 89 97 public PackagedSession getStateWithOwnership (String appName, Object keyId) throws java.rmi.RemoteException ; 98 99 105 public void takeOwnership (String appName, Object keyId) throws java.rmi.RemoteException ; 106 107 112 public void removeSession (String appName, Object keyId); 113 114 } 115 116 | Popular Tags |