public final class ExternalComponent extends XmppSession
XmppSession.Status| Constructor and Description |
|---|
ExternalComponent(String componentName,
String sharedSecret,
String hostname,
int port)
Deprecated.
|
ExternalComponent(String componentName,
String sharedSecret,
XmppSessionConfiguration configuration,
String hostname,
int port)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(rocks.xmpp.addr.Jid from) |
static ExternalComponent |
create(String componentName,
String sharedSecret,
String hostname,
int port)
Creates a new external component using a default configuration.
|
static ExternalComponent |
create(String componentName,
String sharedSecret,
XmppSessionConfiguration configuration,
String hostname,
int port)
Creates a new external component.
|
rocks.xmpp.addr.Jid |
getConnectedResource()
The connected resource, which is assigned by the server.
|
boolean |
handleElement(Object element)
Handles an XMPP element.
|
void |
notifyException(Throwable e)
Called if any unhandled exception is thrown during reading or writing.
|
Future<?> |
send(StreamElement element)
Sends an XML element to the server, usually a stanza, i.e. a message, presence or IQ.
|
SendTask<IQ> |
sendIQ(IQ iq)
Sends an IQ.
|
SendTask<Message> |
sendMessage(Message message)
Sends a message.
|
SendTask<Presence> |
sendPresence(Presence presence)
Sends a presence.
|
addConnectionListener, addCreationListener, addInboundIQListener, addInboundMessageListener, addInboundPresenceListener, addIQHandler, addIQHandler, addMessageAcknowledgedListener, addOutboundIQListener, addOutboundMessageListener, addOutboundPresenceListener, addSessionStatusListener, close, connect, createMarshaller, createUnmarshaller, disableFeature, disableFeature, enableFeature, enableFeature, getActiveConnection, getConfiguration, getConnections, getDebugger, getDomain, getEnabledFeatures, getManager, getStatus, getUnacknowledgedStanzas, isAuthenticated, isConnected, markAcknowledged, query, query, query, removeConnectionListener, removeCreationListener, removeInboundIQListener, removeInboundMessageListener, removeInboundPresenceListener, removeIQHandler, removeMessageAcknowledgedListener, removeOutboundIQListener, removeOutboundMessageListener, removeOutboundPresenceListener, removeSessionStatusListener, sendAndAwaitMessage, sendAndAwaitPresence@Deprecated public ExternalComponent(String componentName, String sharedSecret, String hostname, int port)
@Deprecated public ExternalComponent(String componentName, String sharedSecret, XmppSessionConfiguration configuration, String hostname, int port)
public static ExternalComponent create(String componentName, String sharedSecret, String hostname, int port)
creation listeners are triggered.componentName - The component name.sharedSecret - The shared secret (password).hostname - The hostname to connect to.port - The port to connect to.public static ExternalComponent create(String componentName, String sharedSecret, XmppSessionConfiguration configuration, String hostname, int port)
creation listeners are triggered.componentName - The component name.sharedSecret - The shared secret (password).configuration - The configuration.hostname - The hostname to connect to.port - The port to connect to.public final void connect(rocks.xmpp.addr.Jid from)
throws XmppException
connect in class XmppSessionXmppExceptionpublic final boolean handleElement(Object element) throws XmppException
XmppSessionThis method should be called on the reader thread.
handleElement in class XmppSessionelement - The XMPP element.StreamErrorException - If the element is a stream error.StreamNegotiationException - If any exception occurred during stream feature negotiation.XmppException - If any other XMPP exception occurs.public final void notifyException(Throwable e)
XmppSessionThis method will close the stream.
notifyException in class XmppSessione - The exception. If an unrecoverable XMPP stream error occurred, the exception is a StreamError.public final rocks.xmpp.addr.Jid getConnectedResource()
XmppSessiongetConnectedResource in class XmppSessionpublic final Future<?> send(StreamElement element)
XmppSessionsend in class XmppSessionelement - The XML element.Message is translated to a ClientMessage.public final SendTask<IQ> sendIQ(IQ iq)
XmppSessionsendIQ in class XmppSessioniq - The IQ.public final SendTask<Message> sendMessage(Message message)
XmppSessionsendMessage in class XmppSessionmessage - The message.public final SendTask<Presence> sendPresence(Presence presence)
XmppSessionsendPresence in class XmppSessionpresence - The presence.Copyright © 2014–2016 XMPP.rocks. All rights reserved.