|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.server.SessionManager
public class SessionManager
The SessionManager manages the client sessions that are currently open in the client. It implements the OPC UA Session service set.
| Field Summary | |
|---|---|
protected List<SessionManagerListener> |
listeners
|
protected Map<org.opcfoundation.ua.builtintypes.NodeId,Session> |
newSessions
|
| Constructor Summary | |
|---|---|
SessionManager(UaServer server)
|
|
| Method Summary | |
|---|---|
protected Session |
activateSession(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel,
org.opcfoundation.ua.builtintypes.NodeId authenticationToken,
org.opcfoundation.ua.core.UserIdentityToken userToken,
org.opcfoundation.ua.core.SignatureData clientSignature,
org.opcfoundation.ua.core.SignedSoftwareCertificate[] signedSoftwareCertificates,
org.opcfoundation.ua.core.SignatureData userTokenSignature,
String[] localeIds)
|
protected void |
activateSessionError(Session session,
org.opcfoundation.ua.core.UserIdentityToken userToken,
Exception e)
|
void |
addListener(SessionManagerListener listener)
Add a new SessionManagerListener. |
protected void |
cancelSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken)
|
protected void |
close()
Close the session manager. |
protected void |
closeSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken,
boolean deleteSubscriptions)
|
protected Session |
createSession(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel,
byte[] clientCertificate,
org.opcfoundation.ua.core.ApplicationDescription clientDescription,
org.opcfoundation.ua.builtintypes.UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName)
|
org.opcfoundation.ua.core.EndpointDescription[] |
getEndpoints()
|
int |
getMaxBrowseContinuationPoints()
The maximum number of continuation points supported by the server for browse requests. |
int |
getMaxHistoryContinuationPoints()
The maximum number of continuation points supported by the server for history read requests. |
int |
getMaxQueryContinuationPoints()
The maximum number of continuation points supported by the server for query requests. |
org.opcfoundation.ua.builtintypes.UnsignedInteger |
getMaxRequestMessageSize()
The value is used to inform the clients that they should not send larger messages than this to the server. |
int |
getMaxSessionCount()
|
double |
getMaxSessionTimeout()
|
double |
getMinSessionTimeout()
|
UaServer |
getServer()
|
Session |
getSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken)
Get a client session. |
int |
getSessionCount()
|
Collection<Session> |
getSessions()
|
boolean |
hasListener(SessionManagerListener listener)
Check if the manager already has the specified listener. |
boolean |
isRunning()
|
protected Session |
provideSession(String sessionName,
ApplicationIdentity clientIdentity)
Creates a Session instance for given parameters. |
void |
removeListener(SessionManagerListener listener)
Remove a SessionManagerListener. |
void |
setMaxBrowseContinuationPoints(int maxBrowseContinuationPoints)
The maximum number of continuation points supported by the server for browse requests. |
void |
setMaxBrowseContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxBrowseContinuationPoints)
The maximum number of continuation points supported by the server for browse requests. |
void |
setMaxHistoryContinuationPoints(int maxHistoryContinuationPoints)
The maximum number of continuation points supported by the server for history read requests. |
void |
setMaxHistoryContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxHistoryContinuationPoints)
The maximum number of continuation points supported by the server for history read requests. |
void |
setMaxQueryContinuationPoints(int maxQueryContinuationPoints)
The maximum number of continuation points supported by the server for query requests. |
void |
setMaxQueryContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxQueryContinuationPoints)
The maximum number of continuation points supported by the server for query requests. |
void |
setMaxRequestMessageSize(int maxRequestMessageSize)
The value is used to inform the clients that they should not send larger messages than this to the server. |
void |
setMaxRequestMessageSize(org.opcfoundation.ua.builtintypes.UnsignedInteger maxRequestMessageSize)
The value is used to inform the clients that they should not send larger messages than this to the server. |
void |
setMaxSessionCount(int maxSessionCount)
|
void |
setMaxSessionTimeout(double maxSessionTimeout)
The maximum session timeout enabled for the clients. |
void |
setMinSessionTimeout(double minSessionTimeout)
The minimum session timeout enabled for the clients. |
protected void |
start()
Start the session manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<SessionManagerListener> listeners
protected final Map<org.opcfoundation.ua.builtintypes.NodeId,Session> newSessions
| Constructor Detail |
|---|
public SessionManager(UaServer server)
| Method Detail |
|---|
public void addListener(SessionManagerListener listener)
listener - public org.opcfoundation.ua.core.EndpointDescription[] getEndpoints()
public int getMaxBrowseContinuationPoints()
public int getMaxHistoryContinuationPoints()
public int getMaxQueryContinuationPoints()
public org.opcfoundation.ua.builtintypes.UnsignedInteger getMaxRequestMessageSize()
public int getMaxSessionCount()
public double getMaxSessionTimeout()
public double getMinSessionTimeout()
public UaServer getServer()
public Session getSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken)
throws ServiceException
authenticationToken - the token used to identify a client session
ServiceException - if the session is not found, with ServiceResult=Bad_SessionClosedgetSessionCount()public int getSessionCount()
public Collection<Session> getSessions()
public boolean hasListener(SessionManagerListener listener)
listener - the listener to check
public boolean isRunning()
public void removeListener(SessionManagerListener listener)
listener - public void setMaxBrowseContinuationPoints(int maxBrowseContinuationPoints)
Default: 0 (=unlimited)
maxBrowseContinuationPoints - the maxBrowseContinuationPoints to set, the value must be in
the range of UnsignedShortpublic void setMaxBrowseContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxBrowseContinuationPoints)
Default: 0 (=unlimited)
maxBrowseContinuationPoints - the maxBrowseContinuationPoints to setpublic void setMaxHistoryContinuationPoints(int maxHistoryContinuationPoints)
Default: 0 (=unlimited)
maxHistoryContinuationPoints - the maxHistoryContinuationPoints to set, the value must be
in the range of UnsignedShortpublic void setMaxHistoryContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxHistoryContinuationPoints)
Default: 0 (=unlimited)
maxHistoryContinuationPoints - the maxHistoryContinuationPoints to setpublic void setMaxQueryContinuationPoints(int maxQueryContinuationPoints)
Default: 0 (=unlimited)
maxQueryContinuationPoints - the maxQueryContinuationPoints to set, the value must be in
the range of UnsignedShortpublic void setMaxQueryContinuationPoints(org.opcfoundation.ua.builtintypes.UnsignedShort maxQueryContinuationPoints)
Default: 0 (=unlimited)
maxQueryContinuationPoints - the maxQueryContinuationPoints to setpublic void setMaxRequestMessageSize(int maxRequestMessageSize)
maxRequestMessageSize - the maximum request message size to set in bytes. Default is null,
which means that the value is not used. May not be a negative value.public void setMaxRequestMessageSize(org.opcfoundation.ua.builtintypes.UnsignedInteger maxRequestMessageSize)
maxRequestMessageSize - the maximum request message size to set in bytes. Default is null,
which means that the value is not used.public void setMaxSessionCount(int maxSessionCount)
maxSessionCount - the maxSessionCount to setpublic void setMaxSessionTimeout(double maxSessionTimeout)
Default: 3600000 (ms)
maxSessionTimeout - the maxSessionTimeout to set in millisecondspublic void setMinSessionTimeout(double minSessionTimeout)
Default: 100 (ms)
minSessionTimeout - the minSessionTimeout to set in milliseconds
protected Session activateSession(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel,
org.opcfoundation.ua.builtintypes.NodeId authenticationToken,
org.opcfoundation.ua.core.UserIdentityToken userToken,
org.opcfoundation.ua.core.SignatureData clientSignature,
org.opcfoundation.ua.core.SignedSoftwareCertificate[] signedSoftwareCertificates,
org.opcfoundation.ua.core.SignatureData userTokenSignature,
String[] localeIds)
throws ServiceException
ServiceException
protected void activateSessionError(Session session,
org.opcfoundation.ua.core.UserIdentityToken userToken,
Exception e)
session - userToken - e -
ServiceException
protected void cancelSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken)
throws ServiceException
ServiceExceptionprotected void close()
protected void closeSession(org.opcfoundation.ua.builtintypes.NodeId authenticationToken,
boolean deleteSubscriptions)
throws ServiceException
authenticationToken -
ServiceException
protected Session createSession(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel,
byte[] clientCertificate,
org.opcfoundation.ua.core.ApplicationDescription clientDescription,
org.opcfoundation.ua.builtintypes.UnsignedInteger maxResponseMessageSize,
Double requestedSessionTimeout,
String sessionName)
throws ServiceException
ServiceException
protected Session provideSession(String sessionName,
ApplicationIdentity clientIdentity)
sessionName - name for the SessionclientIdentity - client identity for the Session
protected void start()
throws StatusException
StatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||