Class SALSessions
- java.lang.Object
-
- org.apache.synapse.endpoints.dispatch.SALSessions
-
public class SALSessions extends Object
Keeps the states of the sessions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSessions()Clear all the expired sessionsList<Endpoint>getChildEndpoints(SessionInformation information)Returns endpoint sequence related to the given sessionstatic SALSessionsgetInstance()SessionInformationgetSession(String sessionID)return the endpoint for the given session.voidinitialize(boolean isClusteringEnable, org.apache.axis2.context.ConfigurationContext cc)Initialize SALSessions instancebooleanisInitialized()voidregisterChildren(Endpoint endpoint, List<Endpoint> endpoints)This method only use in a clustered environment.voidremoveSession(String sessionId)Removes the endpoint for the given session.voidremoveSessionsOfMember(org.apache.axis2.clustering.Member member)Updates sessions corresponds to a particular member from theestablishedSessionsvoidreset()voidupdateSession(MessageContext synCtx, String sessionID)Update or establish a sessionvoidupdateSession(MessageContext synCtx, SessionCookie cookie)Update or establish a session
-
-
-
Method Detail
-
getInstance
public static SALSessions getInstance()
-
initialize
public void initialize(boolean isClusteringEnable, org.apache.axis2.context.ConfigurationContext cc)Initialize SALSessions instance- Parameters:
isClusteringEnable- is this a clustered environmentcc- Axis config context
-
registerChildren
public void registerChildren(Endpoint endpoint, List<Endpoint> endpoints)
This method only use in a clustered environment.- Parameters:
endpoint- Root endpoint nameendpoints- children
-
updateSession
public void updateSession(MessageContext synCtx, String sessionID)
Update or establish a session- Parameters:
synCtx- Synapse MessageContextsessionID- session id
-
updateSession
public void updateSession(MessageContext synCtx, SessionCookie cookie)
Update or establish a session- Parameters:
synCtx- Synapse MessageContextsessionID- session id
-
getSession
public SessionInformation getSession(String sessionID)
return the endpoint for the given session. Null will be returned , if there is no endpoint for given session.- Parameters:
sessionID- The session identifier- Returns:
- Returns the endpoint for the given session.
-
getChildEndpoints
public List<Endpoint> getChildEndpoints(SessionInformation information)
Returns endpoint sequence related to the given session- Parameters:
information- Session information- Returns:
- endpoint sequence
-
removeSession
public void removeSession(String sessionId)
Removes the endpoint for the given session.- Parameters:
sessionId- The session identifier
-
clearSessions
public void clearSessions()
Clear all the expired sessions
-
isInitialized
public boolean isInitialized()
-
reset
public void reset()
-
removeSessionsOfMember
public void removeSessionsOfMember(org.apache.axis2.clustering.Member member)
Updates sessions corresponds to a particular member from theestablishedSessions- Parameters:
member- subjectedMember
-
-