|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.jabberwookie.Stream
|
+--com.jabberwookie.Client2Server
This implements the most common form of Jabber stream. That of a client (user) connecting to the server (usually for IM).
| Field Summary | |
static int |
LOGIN_BAD_PASS
|
static int |
LOGIN_BAD_UID
|
static int |
LOGIN_FAILED
|
static int |
LOGIN_OK
|
static int |
LOGIN_PASS_EXP
|
| Fields inherited from class com.jabberwookie.Stream |
chunkProcessor, chunkQueue, connected, connectionId, DEBUG, in, iqListener, mListener, ns, out, outWriter, parserT, pListener, processor, PROCESSOR_WAIT_TIME, unListener, waitingIds |
| Constructor Summary | |
Client2Server(java.io.InputStream in,
java.io.OutputStream out)
Creates a new instance of Client2Server. |
|
Client2Server(java.io.InputStream in,
java.io.OutputStream out,
Processor processor)
Creates a new instance of Client2Server. |
|
| Method Summary | |
void |
close()
Closes down the stream. |
void |
docStart(java.lang.String tag,
java.util.Hashtable attrs)
Overrides the docStart from Stream in order to catch the server name. |
java.lang.String |
getServerName()
Gets the name of the server as returned by the server. |
int |
login(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int minLevel,
int maxLevel,
int timeOut)
Will login with the specified authentication mechanisms. |
int |
loginAny(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
Logs in useing any suppored authentication mechanism, in the order of most to least secure. |
int |
loginDigest(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
Attempts to login via digest authentication or stronger only. |
int |
loginZeroK(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
Attempts to login with Zero Knowledge authentication only. |
boolean |
open(java.lang.String serverName,
int timeoutMillis)
Opens the stream, but does not login. |
| Methods inherited from class com.jabberwookie.Stream |
cData, chunkStart, chunkStop, docStop, dtdData, elementStart, elementStop, getConnectionId, isConnected, processChunk, processingInstruction, send, send, setAllListeners, setIQListener, setMessageListener, setNamespaces, setPresenceListener, setProcessor, setUnrecogizedChunkListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LOGIN_BAD_PASS
public static final int LOGIN_BAD_UID
public static final int LOGIN_FAILED
public static final int LOGIN_OK
public static final int LOGIN_PASS_EXP
| Constructor Detail |
public Client2Server(java.io.InputStream in,
java.io.OutputStream out)
public Client2Server(java.io.InputStream in,
java.io.OutputStream out,
Processor processor)
Stream.Stream(InputStream,OutputStream,Processor)
and Stream.setProcessor(Processor) for more information about
the Processor.
| Method Detail |
public java.lang.String getServerName()
public boolean open(java.lang.String serverName,
int timeoutMillis)
throws java.io.IOException
login(java.lang.String, java.lang.String, java.lang.String, int, int, int)
to do that.
open in class StreamserverName - timeoutMillis -
java.io.IOExceptionStream.open(java.lang.String, int)public void close()
close in class Stream
public void docStart(java.lang.String tag,
java.util.Hashtable attrs)
docStart in class Stream
public int loginAny(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
userName - Full JID (minus the resource)resource - password - timeOut - How long to wait before giving up.
LOGIN_BAD_PASS,
LOGIN_BAD_UID, LOGIN_FAILED,
LOGIN_PASS_EXP, or LOGIN_OK.
public int loginDigest(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
userName - Full JID (minus the resource)resource - password - timeOut - How long to wait before giving up.
LOGIN_BAD_PASS,
LOGIN_BAD_UID, LOGIN_FAILED,
LOGIN_PASS_EXP, or LOGIN_OK.
public int loginZeroK(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int timeOut)
userName - Full JID (minus the resource)resource - password - timeOut - How long to wait before giving up.
LOGIN_BAD_PASS,
LOGIN_BAD_UID, LOGIN_FAILED,
LOGIN_PASS_EXP, or LOGIN_OK.
public int login(java.lang.String userName,
java.lang.String resource,
java.lang.String password,
int minLevel,
int maxLevel,
int timeOut)
userName - Full JID (minus the resource)resource - password - minLevel - The minimum requested authentication level.
One of IQAuth.LEVEL_PLAINTEXT,
IQAuth.LEVEL_DIGEST, or IQAuth.LEVEL_ZERO_K.maxLevel - The maximum requested authentication level.
One of IQAuth.LEVEL_PLAINTEXT,
IQAuth.LEVEL_DIGEST, or IQAuth.LEVEL_ZERO_K.timeOut - How long to wait before giving up.
LOGIN_BAD_PASS,
LOGIN_BAD_UID, LOGIN_FAILED,
LOGIN_PASS_EXP, or LOGIN_OK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||