java.lang.Object
com.jabberwookie.Stream
com.jabberwookie.Component2Server
- All Implemented Interfaces:
- com.ssttr.xml.SAXInterface, UnrecognizedChunkListener
- public class Component2Server
- extends Stream
- implements UnrecognizedChunkListener
Implements the required methods to establish a connection to a
Jabber server as a component. This allows you to create new
services for the server.
| Nested classes inherited from class com.jabberwookie.Stream |
|
| 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 |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STREAM_OPENER
private static final java.lang.String STREAM_OPENER
- See Also:
- Constant Field Values
STREAM_CLOSER
private static final java.lang.String STREAM_CLOSER
- See Also:
- Constant Field Values
secret
private java.lang.String secret
authenticated
private boolean authenticated
Component2Server
public Component2Server(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String secret)
- Creates a new instance of Component2Server. Since this class
doesn't understand what a Socket is you'll have to open
one youself and then pass in the input and output stream.
Component2Server
public Component2Server(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String secret,
com.ssttr.util.processor.Processor processor)
- Creates a new instance of Component2Server. Since this class
doesn't understand what a Socket is you'll have to open
one youself and then pass in the input and output stream.
Please see the documentation for
Stream.Stream(InputStream,OutputStream,Processor) 55
and Stream.setProcessor(com.ssttr.util.processor.Processor) 55 for more information about
the Processor.
_init
private void _init(java.lang.String secret)
setUnrecogizedChunkListener
public void setUnrecogizedChunkListener(UnrecognizedChunkListener listener)
- Since Jabber components are set to receive data from specific
namespaces only this overrides the default
Stream.setUnrecogizedChunkListener(com.jabberwookie.UnrecognizedChunkListener) 55 to do nothing.
- Overrides:
setUnrecogizedChunkListener in class Stream
open
public boolean open(java.lang.String serverName,
int timeoutSecs)
throws java.io.IOException
- Opens the stream and attempts to authenticate itself.
- Specified by:
open in class Stream
close
public void close()
- Closes the stream.
- Specified by:
close in class Stream
docStart
public void docStart(java.lang.String tag,
java.util.Hashtable attrs)
- Specified by:
docStart in interface com.ssttr.xml.SAXInterface- Overrides:
docStart in class Stream
incomingChunk
public void incomingChunk(com.jabberwookie.ns.jabber.Chunk chunk)
- From UnrecognizedChunkListener, needed for authentication.
- Specified by:
incomingChunk in interface UnrecognizedChunkListener