Package org.serviceconnector.service
Class Session
java.lang.Object
org.serviceconnector.service.AbstractSession
org.serviceconnector.service.Session
- Direct Known Subclasses:
FileSession
The Class Session. Provides unique id and an attribute map to store data. A session represents virtual relation between a client and a server. Session activity is observed by a
timer. The timer gets initialized when adding the session to the registry. It gets reseted when session is used by requests.
-
Field Summary
Fields inherited from class org.serviceconnector.service.AbstractSession
ipAddressList, server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(XMLDumpWriter writer) Dump the session into the xml writer.Gets the last execute time.doubleGets the session timeout seconds.Gets the stateful server.booleanGets the pending request.voidReset execute time.voidsetPendingRequest(boolean pendingRequest) Sets the pending request.voidsetSessionTimeoutMillis(double sessionTimeoutMillis) Sets the session timeout seconds.Methods inherited from class org.serviceconnector.service.AbstractSession
getCreationTime, getId, getIpAddressList, getServer, getService, getSessionInfo, getTimeout, getTimeouterTask, isCascaded, setServer, setService, setTimeout, setTimeouterTask, toString
-
Constructor Details
-
Session
Instantiates a new session.- Parameters:
sessionInfo- the session infoipAdressList- the ip adress list
-
-
Method Details
-
setSessionTimeoutMillis
public void setSessionTimeoutMillis(double sessionTimeoutMillis) Sets the session timeout seconds.- Parameters:
sessionTimeoutMillis- the new session timeout seconds
-
getSessionTimeoutMillis
public double getSessionTimeoutMillis()Gets the session timeout seconds.- Returns:
- the session timeout seconds
-
getStatefulServer
Gets the stateful server.- Returns:
- the stateful server
-
setPendingRequest
public void setPendingRequest(boolean pendingRequest) Sets the pending request. Careful in use - take care of synchronization.- Parameters:
pendingRequest- the new pending request
-
hasPendingRequest
public boolean hasPendingRequest()Gets the pending request. Careful in use - take care of synchronization. setPendingRequest- Returns:
- the pending request
-
getLastExecuteTime
Gets the last execute time.- Returns:
- the last execute time
-
resetExecuteTime
public void resetExecuteTime()Reset execute time. -
dump
Dump the session into the xml writer.- Specified by:
dumpin classAbstractSession- Parameters:
writer- the writer- Throws:
Exception- the exception
-