|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberContext
public class JabberContext
The session context. It contains information such as login, password, and other session specific information.
Because the context contains session information, it also stores the session ID. The session ID is the ID sent by the server after connection is established.
If you set the username and password both to null, Jabber User Service will create an anonymous resource if the server supports it. If you don't know what it is, don't worry about it.
Also, this is the place to set whether to use SSL to connect to the jabber server for better security
Field Summary | |
---|---|
static int |
DEFAULT_PORT
|
static java.lang.String |
DEFAULT_SERVER
|
static int |
DEFAULT_SSL_PORT
|
Constructor Summary | |
---|---|
JabberContext(java.lang.String username,
java.lang.String password,
java.lang.String serverName)
the default required parameters used by Jabber. |
Method Summary | |
---|---|
java.lang.String |
getPassword()
|
java.lang.String |
getResource()
|
java.lang.String |
getServerName()
normally, this information can be obtained from the connection model. |
JID |
getServerNameJID()
|
java.lang.String |
getSessionID()
|
java.lang.String |
getUsername()
|
boolean |
isSSL()
replies true if this is a SSL connection |
void |
setPassword(java.lang.String password)
|
void |
setResource(java.lang.String resource)
sets the resource name associated with this session. |
void |
setServerName(java.lang.String serverName)
sets the server name that this session will connect to. |
void |
setSessionID(java.lang.String sessionID)
sets the session ID (normally used only during handshake) and should not be changed |
void |
setSSL(boolean secure)
switches the connection between secure and in-secure (default) connection |
void |
setUsername(java.lang.String username)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SERVER
public static final int DEFAULT_PORT
public static final int DEFAULT_SSL_PORT
Constructor Detail |
---|
public JabberContext(java.lang.String username, java.lang.String password, java.lang.String serverName)
username
- the usernamepassword
- the password for the userserverName
- the canonical name of the server name as specificied by the Jabber server itself.Method Detail |
---|
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public void setSSL(boolean secure)
public boolean isSSL()
public JID getServerNameJID()
public java.lang.String getServerName()
public void setServerName(java.lang.String serverName) throws ParseException
ParseException
public java.lang.String getSessionID()
public void setSessionID(java.lang.String sessionID)
public java.lang.String getResource()
public void setResource(java.lang.String resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |