|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The most basic attributes of an XMPP end-point.
Method Summary | |
void |
fastStart()
Starts the endpoint. |
JID |
getComponentName()
Provide the name of this component. |
XmppSession |
getSession()
Provide the underlying XMPP session. |
void |
send(XmppStanza packet)
Send a packet to the Jabber server. |
void |
start()
Starts the endpoint. |
void |
stop()
Stop the session and close the stream to the server. |
Method Detail |
public XmppSession getSession()
Provide the underlying XMPP session. The session might be open or closed.
public void fastStart() throws java.io.IOException
Starts the endpoint. Opens the socket and starts XMPP streaming. If you are interested in the XMPP session lifecycle events, then register using getSession().addListener().
NOTE: This is a non-blocking call and will likely return BEFORE the stream is ready to write to. If you want to know when the stream is ready for writing, call getSession().waitForOpen() or write an XmppSessionListener and look for the SESSION_STARTED event.
java.io.IOException
- Generated when the component could not start.public void start() throws java.io.IOException
Starts the endpoint. Opens the socket and starts XMPP streaming. If you are interested in the XMPP session lifecycle events, then register using getSession().addListener().
This is a blocking call and uses getSession().waitForOpen() to wait until the stream has been established. Uses the default XMPP request timeout of 20 seconds.
java.io.IOException
- Generated when the component could not start.public void stop()
Stop the session and close the stream to the server. Also disable the sesson restarter.
public JID getComponentName()
Provide the name of this component. This method will only work AFTER a session has been started.
public void send(XmppStanza packet) throws java.io.IOException
Send a packet to the Jabber server. This method does not wait for a response.
packet
- The packet to send.
java.io.IOException
- Generated when there are problems writing to the stream.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |