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 void
clearSessions()
Clear all the expired sessionsList<Endpoint>
getChildEndpoints(SessionInformation information)
Returns endpoint sequence related to the given sessionstatic SALSessions
getInstance()
SessionInformation
getSession(String sessionID)
return the endpoint for the given session.void
initialize(boolean isClusteringEnable, org.apache.axis2.context.ConfigurationContext cc)
Initialize SALSessions instanceboolean
isInitialized()
void
registerChildren(Endpoint endpoint, List<Endpoint> endpoints)
This method only use in a clustered environment.void
removeSession(String sessionId)
Removes the endpoint for the given session.void
removeSessionsOfMember(org.apache.axis2.clustering.Member member)
Updates sessions corresponds to a particular member from theestablishedSessions
void
reset()
void
updateSession(MessageContext synCtx, String sessionID)
Update or establish a sessionvoid
updateSession(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
-
-