Class ModularXmppClientToServerConnectionInternal
- java.lang.Object
-
- org.jivesoftware.smack.c2s.internal.ModularXmppClientToServerConnectionInternal
-
public abstract class ModularXmppClientToServerConnectionInternal extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description ModularXmppClientToServerConnection
connection
java.util.Queue<TopLevelStreamElement>
outgoingElementsQueue
SmackDebugger
smackDebugger
-
Constructor Summary
Constructors Constructor Description ModularXmppClientToServerConnectionInternal(ModularXmppClientToServerConnection connection, SmackReactor reactor, SmackDebugger smackDebugger, java.util.Queue<TopLevelStreamElement> outgoingElementsQueue)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addXmppInputOutputFilter(XmppInputOutputFilter xmppInputOutputFilter)
abstract void
asyncGo(java.lang.Runnable runnable)
abstract void
fireFirstLevelElementSendListeners(TopLevelStreamElement element)
abstract XmlEnvironment
getOutgoingStreamXmlEnvironment()
abstract SmackTlsContext
getSmackTlsContext()
abstract java.util.ListIterator<XmppInputOutputFilter>
getXmppInputOutputFilterBeginIterator()
abstract java.util.ListIterator<XmppInputOutputFilter>
getXmppInputOutputFilterEndIterator()
abstract void
invokeConnectionStateMachineListener(ConnectionStateEvent connectionStateEvent)
abstract void
newStreamOpenWaitForFeaturesSequence(java.lang.String waitFor)
abstract void
notifyConnectionError(java.lang.Exception e)
abstract void
notifyWaitingThreads()
abstract void
onStreamClosed()
abstract void
onStreamOpen(XmlPullParser parser)
abstract void
parseAndProcessElement(java.lang.String wrappedCompleteIncomingElement)
java.nio.channels.SelectionKey
registerWithSelector(java.nio.channels.SelectableChannel channel, int ops, SmackReactor.ChannelSelectedCallback callback)
abstract <SN extends Nonza,FN extends Nonza>
SNsendAndWaitForResponse(Nonza nonza, java.lang.Class<SN> successNonzaClass, java.lang.Class<FN> failedNonzaClass)
abstract void
setCompressionEnabled(boolean compressionEnabled)
void
setInterestOps(java.nio.channels.SelectionKey selectionKey, int interestOps)
abstract void
setTransport(XmppClientToServerTransport xmppTransport)
Set the active transport (TCP, BOSH, WebSocket, …) to be used for the XMPP connection.abstract void
waitForConditionOrThrowConnectionException(Supplier<java.lang.Boolean> condition, java.lang.String waitFor)
void
withSmackDebugger(Consumer<SmackDebugger> smackDebuggerConsumer)
-
-
-
Field Detail
-
connection
public final ModularXmppClientToServerConnection connection
-
smackDebugger
public final SmackDebugger smackDebugger
-
outgoingElementsQueue
public final java.util.Queue<TopLevelStreamElement> outgoingElementsQueue
-
-
Constructor Detail
-
ModularXmppClientToServerConnectionInternal
public ModularXmppClientToServerConnectionInternal(ModularXmppClientToServerConnection connection, SmackReactor reactor, SmackDebugger smackDebugger, java.util.Queue<TopLevelStreamElement> outgoingElementsQueue)
-
-
Method Detail
-
registerWithSelector
public java.nio.channels.SelectionKey registerWithSelector(java.nio.channels.SelectableChannel channel, int ops, SmackReactor.ChannelSelectedCallback callback) throws java.nio.channels.ClosedChannelException
- Throws:
java.nio.channels.ClosedChannelException
-
setInterestOps
public void setInterestOps(java.nio.channels.SelectionKey selectionKey, int interestOps)
-
withSmackDebugger
public final void withSmackDebugger(Consumer<SmackDebugger> smackDebuggerConsumer)
-
getOutgoingStreamXmlEnvironment
public abstract XmlEnvironment getOutgoingStreamXmlEnvironment()
-
parseAndProcessElement
public abstract void parseAndProcessElement(java.lang.String wrappedCompleteIncomingElement)
-
notifyConnectionError
public abstract void notifyConnectionError(java.lang.Exception e)
-
onStreamOpen
public abstract void onStreamOpen(XmlPullParser parser)
-
onStreamClosed
public abstract void onStreamClosed()
-
fireFirstLevelElementSendListeners
public abstract void fireFirstLevelElementSendListeners(TopLevelStreamElement element)
-
invokeConnectionStateMachineListener
public abstract void invokeConnectionStateMachineListener(ConnectionStateEvent connectionStateEvent)
-
addXmppInputOutputFilter
public abstract void addXmppInputOutputFilter(XmppInputOutputFilter xmppInputOutputFilter)
-
getXmppInputOutputFilterBeginIterator
public abstract java.util.ListIterator<XmppInputOutputFilter> getXmppInputOutputFilterBeginIterator()
-
getXmppInputOutputFilterEndIterator
public abstract java.util.ListIterator<XmppInputOutputFilter> getXmppInputOutputFilterEndIterator()
-
newStreamOpenWaitForFeaturesSequence
public abstract void newStreamOpenWaitForFeaturesSequence(java.lang.String waitFor) throws java.lang.InterruptedException, SmackException.NoResponseException, SmackException.NotConnectedException, SmackException, XMPPException
- Throws:
java.lang.InterruptedException
SmackException.NoResponseException
SmackException.NotConnectedException
SmackException
XMPPException
-
getSmackTlsContext
public abstract SmackTlsContext getSmackTlsContext()
-
sendAndWaitForResponse
public abstract <SN extends Nonza,FN extends Nonza> SN sendAndWaitForResponse(Nonza nonza, java.lang.Class<SN> successNonzaClass, java.lang.Class<FN> failedNonzaClass) throws SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.FailedNonzaException, java.lang.InterruptedException
- Throws:
SmackException.NoResponseException
SmackException.NotConnectedException
XMPPException.FailedNonzaException
java.lang.InterruptedException
-
asyncGo
public abstract void asyncGo(java.lang.Runnable runnable)
-
waitForConditionOrThrowConnectionException
public abstract void waitForConditionOrThrowConnectionException(Supplier<java.lang.Boolean> condition, java.lang.String waitFor) throws java.lang.InterruptedException, SmackException, XMPPException
- Throws:
java.lang.InterruptedException
SmackException
XMPPException
-
notifyWaitingThreads
public abstract void notifyWaitingThreads()
-
setCompressionEnabled
public abstract void setCompressionEnabled(boolean compressionEnabled)
-
setTransport
public abstract void setTransport(XmppClientToServerTransport xmppTransport)
Set the active transport (TCP, BOSH, WebSocket, …) to be used for the XMPP connection. Also marks the connection as connected.- Parameters:
xmppTransport
- the active transport.
-
-