|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.server.Session
public class Session
Client session information, managed by the OPC UA client. The session object is used to keep track of a client session, including diagnostic information.
| Field Summary | |
|---|---|
static Session |
INTERNAL_SESSION
|
protected List<SessionListener> |
listeners
|
| Constructor Summary | |
|---|---|
protected |
Session(SessionManager sessionManager,
ApplicationIdentity clientIdentity,
String sessionName)
|
| Method Summary | |
|---|---|
protected void |
activate(ServerUserIdentity userIdentity)
Activate the session. |
protected org.opcfoundation.ua.builtintypes.ByteString |
addBrowseContinuationPoint(BrowseContinuationPoint c)
|
protected org.opcfoundation.ua.builtintypes.ByteString |
addHistoryContinuationPoint(HistoryContinuationPoint historyContinuationPoint)
|
void |
addSessionListener(SessionListener listener)
Add a Sessionlistener. |
protected void |
addSubscription(Subscription s)
|
protected void |
cancel()
This Service is used to cancel outstanding Service requests. |
protected void |
close(boolean deleteSubscriptions)
This Service is used to terminate a Session. |
protected void |
deactivate()
Set active=false. |
boolean |
equals(Object obj)
|
static long |
getActivationTimeout()
Activation timeout: if a new session is not activated soon enough, it is disposed. |
org.opcfoundation.ua.builtintypes.NodeId |
getAuthenticationToken()
A unique identifier assigned by the Server to the Session. |
protected BrowseContinuationPoint |
getBrowseContinuationPoint(org.opcfoundation.ua.builtintypes.ByteString continuationPoint)
Find the BrowseContinuationPoint object indexed with the byte array. |
org.opcfoundation.ua.transport.ServerSecureChannel |
getChannel()
|
ApplicationIdentity |
getClientIdentity()
The identity of the client application. |
org.opcfoundation.ua.builtintypes.DateTime |
getClientLastContactTime()
Last time we got a message from the client, telling us that it was alive. |
protected org.opcfoundation.ua.builtintypes.QualifiedName |
getDefaultEncoding()
Default data encoding used in the session. |
Locale |
getDefaultLocale()
|
protected HistoryContinuationPoint |
getHistoryContinuationPoint(org.opcfoundation.ua.builtintypes.ByteString continuationPoint)
Find the HistoryContinuationPoint object indexed with the byte array. |
Locale[] |
getLocales()
The locales defined by the client, to use in the session. |
org.opcfoundation.ua.builtintypes.UnsignedInteger |
getMaxResponseMessageSize()
Maximum size of response messages sent over the stack, as defined by the client. |
protected org.opcfoundation.ua.builtintypes.ByteString |
getNewServerNonce(int minServerNonceLength)
Create a new serverNonce using minServerNonceLength. |
protected org.opcfoundation.ua.builtintypes.ByteString |
getServerNonce()
|
SessionDiagnostics |
getSessionDiagnostics()
Diagnostic information of the session. |
org.opcfoundation.ua.builtintypes.NodeId |
getSessionId()
|
protected SessionManager |
getSessionManager()
|
String |
getSessionName()
Human readable string that identifies the Session. |
SessionSecurityDiagnostics |
getSessionSecurityDiagnostics()
Security diagnostics of the session. |
double |
getSessionTimeout()
|
int |
getSubscriptionCount()
Current number of subscriptions in the session. |
protected Queue<Subscription> |
getTransferredSubscriptions()
|
ServerUserIdentity |
getUserIdentity()
The user identity that was used to activate the session. |
int |
hashCode()
|
boolean |
hasLocale(Locale locale)
Check if the session accepts a locale. |
boolean |
hasSessionListener(SessionListener listener)
Check if a given listener is added |
boolean |
isActive()
|
boolean |
isTimeout()
|
void |
removeSessionListener(SessionListener listener)
Remove a SessionListener. |
protected void |
removeSubscription(Subscription s)
|
protected void |
resetDiagnostics()
Resets the service diagnostics. |
static void |
setActivationTimeout(long activationTimeout)
/** Activation timeout: if a new session is not activated soon enough, it is disposed. |
protected void |
setChannel(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel)
|
protected void |
setLocaleIds(String[] localeIds)
The localeIDs defined by the client, to use in the session |
protected void |
setMaxResponseMessageSize(org.opcfoundation.ua.builtintypes.UnsignedInteger maxResponseMessageSize)
|
protected void |
setSessionName(String name)
|
protected void |
setSessionTimeout(double requestedSessionTimeout)
Define the session timeout. |
String |
toString()
|
protected void |
updateDiagnostics()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Session INTERNAL_SESSION
protected List<SessionListener> listeners
| Constructor Detail |
|---|
protected Session(SessionManager sessionManager,
ApplicationIdentity clientIdentity,
String sessionName)
| Method Detail |
|---|
public static long getActivationTimeout()
Default: 10 s
public static void setActivationTimeout(long activationTimeout)
Default: 10 s
activationTimeout - the new timeout. the activationTimeout to setpublic void addSessionListener(SessionListener listener)
listener - listener to add.public boolean equals(Object obj)
equals in class Objectpublic org.opcfoundation.ua.builtintypes.NodeId getAuthenticationToken()
public org.opcfoundation.ua.transport.ServerSecureChannel getChannel()
public ApplicationIdentity getClientIdentity()
public org.opcfoundation.ua.builtintypes.DateTime getClientLastContactTime()
public Locale getDefaultLocale()
public Locale[] getLocales()
#getDiagnostics()
public org.opcfoundation.ua.builtintypes.UnsignedInteger getMaxResponseMessageSize()
public SessionDiagnostics getSessionDiagnostics()
public org.opcfoundation.ua.builtintypes.NodeId getSessionId()
public String getSessionName()
public SessionSecurityDiagnostics getSessionSecurityDiagnostics()
public double getSessionTimeout()
public int getSubscriptionCount()
public ServerUserIdentity getUserIdentity()
public int hashCode()
hashCode in class Objectpublic boolean hasLocale(Locale locale)
locale -
public boolean hasSessionListener(SessionListener listener)
listener - listener to check
public boolean isActive()
public boolean isTimeout()
public void removeSessionListener(SessionListener listener)
listener - listener to remove.public String toString()
toString in class Object
protected void activate(ServerUserIdentity userIdentity)
throws StatusException
userIdentity - the new user identity
StatusException
protected org.opcfoundation.ua.builtintypes.ByteString addBrowseContinuationPoint(BrowseContinuationPoint c)
throws StatusException
r -
StatusException
protected org.opcfoundation.ua.builtintypes.ByteString addHistoryContinuationPoint(HistoryContinuationPoint historyContinuationPoint)
throws StatusException
resultUserContinuationPoint - historyContinuationPoint -
StatusExceptionprotected void addSubscription(Subscription s)
protected void cancel()
protected void close(boolean deleteSubscriptions)
deleteSubscriptions - Also remove all subscriptions, currently registered for the session.protected void deactivate()
protected BrowseContinuationPoint getBrowseContinuationPoint(org.opcfoundation.ua.builtintypes.ByteString continuationPoint)
throws StatusException
continuationPoint - the bytearray "index"
StatusException - Bad_ContinuationPointInvalidprotected org.opcfoundation.ua.builtintypes.QualifiedName getDefaultEncoding()
protected HistoryContinuationPoint getHistoryContinuationPoint(org.opcfoundation.ua.builtintypes.ByteString continuationPoint)
throws StatusException
continuationPoint - the bytearray "index"
StatusException - Bad_ContinuationPointInvalidprotected org.opcfoundation.ua.builtintypes.ByteString getNewServerNonce(int minServerNonceLength)
minServerNonceLength -
protected org.opcfoundation.ua.builtintypes.ByteString getServerNonce()
protected SessionManager getSessionManager()
protected Queue<Subscription> getTransferredSubscriptions()
protected void removeSubscription(Subscription s)
protected void resetDiagnostics()
protected void setChannel(org.opcfoundation.ua.transport.ServerSecureChannel serverSecureChannel)
serverSecureChannel - the channel to setprotected void setLocaleIds(String[] localeIds)
localeIds - protected void setMaxResponseMessageSize(org.opcfoundation.ua.builtintypes.UnsignedInteger maxResponseMessageSize)
maxResponseMessageSize - protected void setSessionName(String name)
name - the name to setprotected void setSessionTimeout(double requestedSessionTimeout)
requestedSessionTimeout - The timeout requested by the Client. This may be revised to
another value, which is then available from getSessionTimeoutprotected void updateDiagnostics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||