public class XmppNioTcpConnection extends AbstractXmppNioConnection
AbstractXmppStateMachineConnection.AuthenticatedAndResourceBoundStateDescriptor, AbstractXmppStateMachineConnection.AuthenticatedButUnboundStateDescriptor, AbstractXmppStateMachineConnection.CompressionStateDescriptor, AbstractXmppStateMachineConnection.ConnectedButUnauthenticatedStateDescriptor, AbstractXmppStateMachineConnection.DisconnectedState, AbstractXmppStateMachineConnection.DisconnectedStateDescriptor, AbstractXmppStateMachineConnection.NoOpState, AbstractXmppStateMachineConnection.ResourceBindingStateDescriptor, AbstractXmppStateMachineConnection.SaslAuthenticationStateDescriptor, AbstractXmppStateMachineConnection.State, AbstractXmppStateMachineConnection.TransitionFailedReason, AbstractXmppStateMachineConnection.TransitionImpossibleReason, AbstractXmppStateMachineConnection.WalkStateGraphContext, AbstractXmppStateMachineConnection.WalkStateGraphContextBuilder
AbstractXMPPConnection.InterceptorWrapper, AbstractXMPPConnection.ListenerWrapper, AbstractXMPPConnection.SmackTlsContext
XMPPConnection.FromMode
streamResumed
authenticated, closingStreamReceived, compressionHandler, config, connected, connectionCounterValue, connectionListeners, connectionLock, debugger, host, hostAddresses, lastFeaturesReceived, port, reader, saslAuthentication, saslFeatureReceived, SMACK_REACTOR, streamFeatures, streamId, tlsHandled, user, wasAuthenticated, writer
Constructor and Description |
---|
XmppNioTcpConnection(XMPPTCPConnectionConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
connectInternal()
Abstract method that concrete subclasses of XMPPConnection need to implement to perform their
way of XMPP connection establishment.
|
static Set<Class<? extends StateDescriptor>> |
getBackwardEdgesStateDescriptors() |
protected SSLSession |
getSSLSession() |
XmppNioTcpConnection.Stats |
getStats() |
void |
instantShutdown() |
boolean |
isSecureConnection()
Returns true if the connection to the server has successfully negotiated encryption.
|
boolean |
isUsingCompression()
Returns true if network traffic is being compressed.
|
void |
sendNonza(Nonza nonza)
Send a Nonza.
|
protected void |
sendStanzaInternal(Stanza stanza) |
protected void |
shutdown()
Shuts the current connection down.
|
protected void |
throwNotConnectedExceptionIfAppropriate() |
finalize, registerWithSelector, setInterestOps
addXmppInputOutputFilter, afterFeaturesReceived, buildNewWalkTo, getXmppInputOutputFilterBeginIterator, getXmppInputOutputFilterEndIterator, loginInternal, newStreamOpenWaitForFeaturesSequence, parseAndProcessElement, prepareToWaitForFeaturesReceived, waitForFeaturesReceived, walkStateGraph
addAsyncStanzaListener, addConnectionListener, addOneTimeSyncCallback, addStanzaInterceptor, addStanzaSendingListener, addStreamFeature, addSyncStanzaListener, afterSuccessfulLogin, asyncGo, bindResourceAndEstablishSession, buildNonzaCallback, callConnectionAuthenticatedListener, callConnectionClosedOnErrorListener, callConnectionConnectedListener, connect, createStanzaCollector, createStanzaCollector, createStanzaCollectorAndSend, createStanzaCollectorAndSend, disconnect, disconnect, firePacketSendingListeners, getConfiguration, getConnectionCounter, getConnectionLock, getFeature, getFromMode, getHost, getLastStanzaReceived, getParsingExceptionCallback, getPort, getReplyTimeout, getSASLAuthentication, getSmackTlsContext, getStreamId, getUsedSaslMechansism, getUser, getXMPPServiceDomain, hasFeature, initDebugger, invokeStanzaCollectorsAndNotifyRecvListeners, isAnonymous, isAuthenticated, isConnected, login, login, login, onStreamOpen, parseAndProcessNonza, parseAndProcessStanza, parseFeatures, parseFeaturesAndNotify, populateHostAddresses, processStanza, registerIQRequestHandler, removeAsyncStanzaListener, removeConnectionListener, removeStanzaCollector, removeStanzaInterceptor, removeStanzaSendingListener, removeSyncStanzaListener, schedule, sendAndWaitForResponse, sendAsync, sendAsync, sendIqRequestAndWaitForResponse, sendIqRequestAsync, sendIqRequestAsync, sendStanza, sendStreamOpen, setFromMode, setParsingExceptionCallback, setReplyTimeout, setUnknownIqRequestReplyMode, setWasAuthenticated, throwAlreadyConnectedExceptionIfAppropriate, throwAlreadyLoggedInExceptionIfAppropriate, throwNotConnectedExceptionIfAppropriate, toString, trySendStanza, trySendStanza, unregisterIQRequestHandler, unregisterIQRequestHandler
public XmppNioTcpConnection(XMPPTCPConnectionConfiguration configuration)
public static Set<Class<? extends StateDescriptor>> getBackwardEdgesStateDescriptors()
protected void connectInternal() throws SmackException, IOException, XMPPException, InterruptedException
AbstractXMPPConnection
connectInternal
in class AbstractXMPPConnection
SmackException
IOException
XMPPException
InterruptedException
public boolean isSecureConnection()
XMPPConnection
isSecureConnection
in interface XMPPConnection
isSecureConnection
in class AbstractXMPPConnection
protected void throwNotConnectedExceptionIfAppropriate()
throwNotConnectedExceptionIfAppropriate
in class AbstractXMPPConnection
protected void sendStanzaInternal(Stanza stanza) throws SmackException.NotConnectedException, InterruptedException
sendStanzaInternal
in class AbstractXMPPConnection
SmackException.NotConnectedException
InterruptedException
public void sendNonza(Nonza nonza) throws SmackException.NotConnectedException, InterruptedException
XMPPConnection
This 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 XMPPConnection
sendNonza
in class AbstractXMPPConnection
nonza
- the Nonza to send.SmackException.NotConnectedException
InterruptedException
public boolean isUsingCompression()
XMPPConnection
isUsingCompression
in interface XMPPConnection
isUsingCompression
in class AbstractXMPPConnection
protected void shutdown()
AbstractXMPPConnection
shutdown
in class AbstractXMPPConnection
public void instantShutdown()
public XmppNioTcpConnection.Stats getStats()
protected SSLSession getSSLSession()
getSSLSession
in class AbstractXmppStateMachineConnection