public final class ModularXmppClientToServerConnection extends AbstractXMPPConnection
| Modifier and Type | Class and Description |
|---|---|
static class |
ModularXmppClientToServerConnection.AuthenticatedAndResourceBoundStateDescriptor |
static class |
ModularXmppClientToServerConnection.AuthenticatedButUnboundStateDescriptor |
static class |
ModularXmppClientToServerConnection.ConnectedButUnauthenticatedStateDescriptor |
static class |
ModularXmppClientToServerConnection.DisconnectedStateDescriptor |
static class |
ModularXmppClientToServerConnection.LookupRemoteConnectionEndpointsStateDescriptor |
static class |
ModularXmppClientToServerConnection.ResourceBindingStateDescriptor |
static class |
ModularXmppClientToServerConnection.ResourceBoundResult |
static class |
ModularXmppClientToServerConnection.SaslAuthenticationStateDescriptor |
static class |
ModularXmppClientToServerConnection.SaslAuthenticationSuccessResult |
static class |
ModularXmppClientToServerConnection.Stats |
AbstractXMPPConnection.InterceptorWrapper, AbstractXMPPConnection.ListenerWrapper, AbstractXMPPConnection.SyncPointStateXMPPConnection.FromMode| Modifier and Type | Field and Description |
|---|---|
protected boolean |
streamResumed |
ASYNC_BUT_ORDERED, authenticated, authenticatedConnectionInitiallyEstablishedTimestamp, closingStreamReceived, compressionHandler, config, connected, connectionCounterValue, connectionListeners, connectionLock, currentSmackException, currentXmppException, debugger, host, lastFeaturesReceived, outgoingStreamXmlEnvironment, port, reader, saslFeatureReceived, SMACK_REACTOR, streamFeatures, streamId, tlsHandled, user, wasAuthenticated, writer| Constructor and Description |
|---|
ModularXmppClientToServerConnection(ModularXmppClientToServerConnectionConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionStateMachineListener(ConnectionStateMachineListener connectionStateMachineListener) |
protected void |
afterFeaturesReceived() |
protected WalkStateGraphContext.Builder |
buildNewWalkTo(java.lang.Class<? extends StateDescriptor> finalStateClass) |
protected void |
connectInternal()
Abstract method that concrete subclasses of XMPPConnection need to implement to perform their
way of XMPP connection establishment.
|
ModularXmppClientToServerConnectionConfiguration |
getConfiguration()
Get the connection configuration used by this connection.
|
<CM extends ModularXmppClientToServerConnectionModule<? extends ModularXmppClientToServerConnectionModuleDescriptor>> |
getConnectionModuleFor(java.lang.Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> descriptorClass) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getFilterStats() |
protected javax.net.ssl.SSLSession |
getSSLSession() |
ModularXmppClientToServerConnection.Stats |
getStats() |
void |
instantShutdown()
Performs an unclean disconnect and shutdown of the connection.
|
protected void |
invokeConnectionStateMachineListener(ConnectionStateEvent connectionStateEvent) |
boolean |
isSecureConnection()
Returns true if the connection to the server has successfully negotiated encryption.
|
boolean |
isUsingCompression()
Returns true if network traffic is being compressed.
|
protected void |
loginInternal(java.lang.String username,
java.lang.String password,
org.jxmpp.jid.parts.Resourcepart resource) |
protected void |
newStreamOpenWaitForFeaturesSequence(java.lang.String waitFor) |
protected void |
parseAndProcessElement(java.lang.String element) |
protected void |
prepareToWaitForFeaturesReceived() |
boolean |
removeConnectionStateMachineListener(ConnectionStateMachineListener connectionStateMachineListener) |
void |
sendNonza(Nonza nonza)
Send a Nonza.
|
protected void |
sendStanzaInternal(Stanza stanza) |
protected void |
shutdown()
Shuts the current connection down.
|
protected void |
waitForFeaturesReceived(java.lang.String waitFor) |
protected void |
walkStateGraph(WalkStateGraphContext walkStateGraphContext) |
addAsyncStanzaListener, addConnectionListener, addMessageInterceptor, addOneTimeSyncCallback, addPresenceInterceptor, addStanzaInterceptor, addStanzaListener, addStanzaSendingListener, addStreamFeature, addSyncStanzaListener, afterSaslAuthenticationSuccess, afterSuccessfulLogin, asyncGo, asyncGoLimited, authenticate, bindResourceAndEstablishSession, buildNonzaCallback, callConnectionAuthenticatedListener, callConnectionConnectedListener, callConnectionConnectingListener, connect, createStanzaCollector, createStanzaCollector, createStanzaCollectorAndSend, createStanzaCollectorAndSend, disconnect, disconnect, firePacketSendingListeners, getAuthenticatedConnectionInitiallyEstablishedTimestamp, getConnectionCounter, getConnectionLock, getFeature, getFromMode, getHost, getLastStanzaReceived, getParsingExceptionCallback, getPort, getReactor, getReplyTimeout, getSmackTlsContext, getStanzaFactory, getStreamId, getUsedSaslMechansism, getUser, getXMPPServiceDomain, hasCurrentConnectionException, hasFeature, initDebugger, initState, invokeStanzaCollectorsAndNotifyRecvListeners, isAnonymous, isAuthenticated, isConnected, isSaslAuthenticated, login, login, login, notifyConnectionError, notifyWaitingThreads, onStreamOpen, parseAndProcessNonza, parseAndProcessStanza, parseFeatures, parseFeaturesAndNotify, processStanza, registerIQRequestHandler, removeAsyncStanzaListener, removeConnectionListener, removeMessageInterceptor, removePresenceInterceptor, removeStanzaCollector, removeStanzaInterceptor, removeStanzaListener, removeStanzaSendingListener, removeSyncStanzaListener, schedule, sendAndWaitForResponse, sendAsync, sendAsync, sendIqRequestAndWaitForResponse, sendIqRequestAsync, sendIqRequestAsync, sendStanza, sendStreamOpen, setCurrentConnectionExceptionAndNotify, setFromMode, setMaxAsyncOperations, setParsingExceptionCallback, setReplyTimeout, setUnknownIqRequestReplyMode, setWasAuthenticated, throwAlreadyConnectedExceptionIfAppropriate, throwAlreadyLoggedInExceptionIfAppropriate, throwCurrentConnectionException, throwNotConnectedExceptionIfAppropriate, throwNotConnectedExceptionIfAppropriate, toString, trySendStanza, trySendStanza, unregisterIQRequestHandler, unregisterIQRequestHandler, waitFor, waitForClosingStreamTagFromServer, waitForConditionOrThrowConnectionExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFeature, getFeature, hasFeaturepublic ModularXmppClientToServerConnection(ModularXmppClientToServerConnectionConfiguration configuration)
public <CM extends ModularXmppClientToServerConnectionModule<? extends ModularXmppClientToServerConnectionModuleDescriptor>> CM getConnectionModuleFor(java.lang.Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> descriptorClass)
protected void loginInternal(java.lang.String username,
java.lang.String password,
org.jxmpp.jid.parts.Resourcepart resource)
throws XMPPException,
SmackException,
java.io.IOException,
java.lang.InterruptedException
loginInternal in class AbstractXMPPConnectionXMPPExceptionSmackExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionprotected WalkStateGraphContext.Builder buildNewWalkTo(java.lang.Class<? extends StateDescriptor> finalStateClass)
protected void walkStateGraph(WalkStateGraphContext walkStateGraphContext) throws XMPPException, java.io.IOException, SmackException, java.lang.InterruptedException
XMPPExceptionjava.io.IOExceptionSmackExceptionjava.lang.InterruptedExceptionprotected void sendStanzaInternal(Stanza stanza) throws SmackException.NotConnectedException, java.lang.InterruptedException
sendStanzaInternal in class AbstractXMPPConnectionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic void sendNonza(Nonza nonza) throws SmackException.NotConnectedException, java.lang.InterruptedException
XMPPConnectionThis method is not meant for end-user usage! It allows sending plain stream elements, which should not be done by a user manually. Doing so may result in a unstable or unusable connection. Certain Smack APIs use this method to send plain stream elements.
sendNonza in interface XMPPConnectionsendNonza in class AbstractXMPPConnectionnonza - the Nonza to send.SmackException.NotConnectedException - if the XMPP connection is not connected.java.lang.InterruptedException - if the calling thread was interrupted.protected void shutdown()
AbstractXMPPConnectionshutdown in class AbstractXMPPConnectionpublic void instantShutdown()
AbstractXMPPConnectioninstantShutdown in class AbstractXMPPConnectionpublic ModularXmppClientToServerConnectionConfiguration getConfiguration()
AbstractXMPPConnectiongetConfiguration in class AbstractXMPPConnectionprotected javax.net.ssl.SSLSession getSSLSession()
protected void afterFeaturesReceived()
afterFeaturesReceived in class AbstractXMPPConnectionprotected void parseAndProcessElement(java.lang.String element)
protected void prepareToWaitForFeaturesReceived()
protected void waitForFeaturesReceived(java.lang.String waitFor)
throws java.lang.InterruptedException,
SmackException,
XMPPException
java.lang.InterruptedExceptionSmackExceptionXMPPExceptionprotected void newStreamOpenWaitForFeaturesSequence(java.lang.String waitFor)
throws java.lang.InterruptedException,
SmackException,
XMPPException
java.lang.InterruptedExceptionSmackExceptionXMPPExceptionpublic boolean isUsingCompression()
XMPPConnectionisUsingCompression in interface XMPPConnectionisUsingCompression in class AbstractXMPPConnectionpublic void addConnectionStateMachineListener(ConnectionStateMachineListener connectionStateMachineListener)
public boolean removeConnectionStateMachineListener(ConnectionStateMachineListener connectionStateMachineListener)
protected void invokeConnectionStateMachineListener(ConnectionStateEvent connectionStateEvent)
public boolean isSecureConnection()
XMPPConnectionisSecureConnection in interface XMPPConnectionisSecureConnection in class AbstractXMPPConnectionprotected void connectInternal()
throws SmackException,
java.io.IOException,
XMPPException,
java.lang.InterruptedException
AbstractXMPPConnectionconnectInternal in class AbstractXMPPConnectionSmackException - if Smack detected an exceptional situation.java.io.IOException - if an I/O error occurred.XMPPException - if an XMPP protocol error was received.java.lang.InterruptedException - if the calling thread was interrupted.protected java.util.Map<java.lang.String,java.lang.Object> getFilterStats()
public ModularXmppClientToServerConnection.Stats getStats()