Package com.verisign.epp.serverstub
Class SessionData
- java.lang.Object
-
- com.verisign.epp.serverstub.SessionData
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class SessionData extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableTheSessionDatais a utility class that contains data related to an established EPP client/server session.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionData()Constructs a new SessionData instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Makes a copy of the invokingSessionDataobjectjava.lang.ObjectgetAttribute(java.lang.String aName)Gets a session attribute by attribute name.EPPGreetinggetGreeting()Returns the EPPGreeting associated with this sessionEPPLoginCmdgetLoginCmd()Gets theEPPLoginCmdused for the authenticated session.EPPMessagegetMessage()Gets theEPPMessagedecoded.booleanhasLogoutOccured()Returns the logout state of this session object.booleanhasMessage()Has the message been set?booleanisLoggedIn()Returns the login state of this session objectvoidsetAttribute(java.lang.String aName, java.lang.Object aResource)Sets a session attribute by use an attribute name (key) along with an attribute value.voidsetGreeting(EPPGreeting aGreeting)Sets the greeting that will be sent to clients when they connectvoidsetLoggedIn(boolean aBool)Sets the login state of this session objectvoidsetLoginCmd(EPPLoginCmd aLoginCmd)Sets theEPPLoginCmdused for the authenticated session.voidsetLogoutOccured(boolean aBool)Sets the logout state of this session object.voidsetMessage(EPPMessage aMessage)Sets theEPPMessagedecoded.
-
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionMakes a copy of the invokingSessionDataobject- Overrides:
clonein classjava.lang.Object- Returns:
- Clone of
SessionData - Throws:
java.lang.CloneNotSupportedException- Error cloningSessionData
-
hasLogoutOccured
public boolean hasLogoutOccured()
Returns the logout state of this session object.- Returns:
- boolean True if a logout has occurred
-
setLogoutOccured
public void setLogoutOccured(boolean aBool)
Sets the logout state of this session object.- Parameters:
aBool- The new logout state
-
isLoggedIn
public boolean isLoggedIn()
Returns the login state of this session object- Returns:
- boolean The login state of this session object
-
getLoginCmd
public EPPLoginCmd getLoginCmd()
Gets theEPPLoginCmdused for the authenticated session.- Returns:
EPPLoginCmdif set;nullotherwise.
-
setLoginCmd
public void setLoginCmd(EPPLoginCmd aLoginCmd)
Sets theEPPLoginCmdused for the authenticated session.- Parameters:
aLoginCmd-EPPLoginCmdpassed by the user for the authenticated session.
-
setLoggedIn
public void setLoggedIn(boolean aBool)
Sets the login state of this session object- Parameters:
aBool- The new login state
-
getGreeting
public EPPGreeting getGreeting()
Returns the EPPGreeting associated with this session- Returns:
- EPPGreeting The greeting
-
setGreeting
public void setGreeting(EPPGreeting aGreeting)
Sets the greeting that will be sent to clients when they connect- Parameters:
aGreeting- The greeting that should be sent.
-
setAttribute
public void setAttribute(java.lang.String aName, java.lang.Object aResource)Sets a session attribute by use an attribute name (key) along with an attribute value.- Parameters:
aName- Name of the attributeaResource- Value of the attribute
-
getAttribute
public java.lang.Object getAttribute(java.lang.String aName)
Gets a session attribute by attribute name.- Parameters:
aName- Name of attribute- Returns:
- Value of attribute if defined;
nullotherwise.
-
hasMessage
public boolean hasMessage()
Has the message been set?- Returns:
trueif the set date has been set;falseotherwise.
-
getMessage
public EPPMessage getMessage()
Gets theEPPMessagedecoded.- Returns:
- Message decoded if set;
nullotherwise
-
setMessage
public void setMessage(EPPMessage aMessage)
Sets theEPPMessagedecoded.- Parameters:
aMessage- Message decoded
-
-