Class ExternalComponent
- java.lang.Object
-
- rocks.xmpp.core.session.XmppSession
-
- rocks.xmpp.extensions.component.accept.ExternalComponent
-
- All Implemented Interfaces:
AutoCloseable,Session,StreamHandler
public final class ExternalComponent extends XmppSession
An external component session which connects to an XMPP server using the "Jabber Component Protocol".- See Also:
- XEP-0114: Jabber Component Protocol
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class rocks.xmpp.core.session.XmppSession
XmppSession.Status
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(Jid from)static ExternalComponentcreate(String componentName, String sharedSecret, String hostname, int port)Creates a new external component using a default configuration.static ExternalComponentcreate(String componentName, String sharedSecret, XmppSessionConfiguration configuration, String hostname, int port)Creates a new external component.static ExternalComponentcreate(String componentName, String sharedSecret, XmppSessionConfiguration xmppSessionConfiguration, ClientConnectionConfiguration connectionConfiguration)Creates a new external component using a default configuration.booleanhandleElement(Object element)voidnotifyException(Throwable e)-
Methods inherited from class rocks.xmpp.core.session.XmppSession
addConnectionListener, addCreationListener, addInboundIQListener, addInboundMessageListener, addInboundPresenceListener, addIQHandler, addIQHandler, addMessageAcknowledgedListener, addOutboundIQListener, addOutboundMessageListener, addOutboundPresenceListener, addSendFailedListener, addSendSucceededListener, addSessionStatusListener, close, closeAsync, closeAsync, connect, createMarshaller, createUnmarshaller, createUnmarshaller, disableFeature, disableFeature, enableFeature, enableFeature, getActiveConnection, getConfiguration, getConnectedResource, getConnections, getDebugger, getDomain, getEnabledFeatures, getLocalXmppAddress, getManager, getReaderInterceptors, getRemoteXmppAddress, getStatus, getUnacknowledgedStanzas, getWriterInterceptors, isAuthenticated, isConnected, isSupported, markAcknowledged, query, query, query, removeConnectionListener, removeCreationListener, removeInboundIQListener, removeInboundMessageListener, removeInboundPresenceListener, removeIQHandler, removeMessageAcknowledgedListener, removeOutboundIQListener, removeOutboundMessageListener, removeOutboundPresenceListener, removeSendFailedListener, removeSendSucceededListener, removeSessionStatusListener, send, sendAndAwaitMessage, sendAndAwaitPresence, sendIQ, sendMessage, sendPresence
-
-
-
-
Method Detail
-
create
public static ExternalComponent create(String componentName, String sharedSecret, String hostname, int port)
Creates a new external component using a default configuration. Any registeredcreation listenersare triggered.- Parameters:
componentName- The component name.sharedSecret- The shared secret (password).hostname- The hostname to connect to.port- The port to connect to.- Returns:
- The external component.
-
create
public static ExternalComponent create(String componentName, String sharedSecret, XmppSessionConfiguration configuration, String hostname, int port)
Creates a new external component. Any registeredcreation listenersare triggered.- Parameters:
componentName- The component name.sharedSecret- The shared secret (password).configuration- The configuration.hostname- The hostname to connect to.port- The port to connect to.- Returns:
- The external component.
-
create
public static ExternalComponent create(String componentName, String sharedSecret, XmppSessionConfiguration xmppSessionConfiguration, ClientConnectionConfiguration connectionConfiguration)
Creates a new external component using a default configuration. Any registeredcreation listenersare triggered.- Parameters:
componentName- The component name.sharedSecret- The shared secret (password).xmppSessionConfiguration- The XMPP configuration.connectionConfiguration- The connection configuration.- Returns:
- The external component.
-
connect
public final void connect(Jid from) throws XmppException
- Specified by:
connectin classXmppSession- Throws:
XmppException
-
handleElement
public final boolean handleElement(Object element) throws XmppException
- Specified by:
handleElementin interfaceStreamHandler- Overrides:
handleElementin classXmppSession- Throws:
XmppException
-
notifyException
public final void notifyException(Throwable e)
- Overrides:
notifyExceptionin classXmppSession
-
-