Package org.jivesoftware.smack
Class SmackFuture.InternalProcessStanzaSmackFuture<V,E extends Exception>
- java.lang.Object
-
- org.jivesoftware.smack.SmackFuture<V,E>
-
- org.jivesoftware.smack.SmackFuture.InternalSmackFuture<V,E>
-
- org.jivesoftware.smack.SmackFuture.InternalProcessStanzaSmackFuture<V,E>
-
- All Implemented Interfaces:
Future<V>
,StanzaListener
,CallbackRecipient<V,E>
,ExceptionCallback<E>
- Direct Known Subclasses:
SmackFuture.SimpleInternalProcessStanzaSmackFuture
- Enclosing class:
- SmackFuture<V,E extends Exception>
public abstract static class SmackFuture.InternalProcessStanzaSmackFuture<V,E extends Exception> extends SmackFuture.InternalSmackFuture<V,E> implements StanzaListener, ExceptionCallback<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jivesoftware.smack.SmackFuture
SmackFuture.InternalProcessStanzaSmackFuture<V,E extends Exception>, SmackFuture.InternalSmackFuture<V,E extends Exception>, SmackFuture.SimpleInternalProcessStanzaSmackFuture<V,E extends Exception>, SmackFuture.SocketFuture
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.smack.SmackFuture
exception, result
-
-
Constructor Summary
Constructors Constructor Description InternalProcessStanzaSmackFuture()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
handleStanza(Stanza stanza)
protected abstract boolean
isNonFatalException(E exception)
This method checks if the given exception is not fatal.void
processException(E exception)
void
processStanza(Stanza stanza)
Wrapper method forhandleStanza(Stanza)
.-
Methods inherited from class org.jivesoftware.smack.SmackFuture.InternalSmackFuture
setException, setResult
-
Methods inherited from class org.jivesoftware.smack.SmackFuture
await, cancel, from, futureWait, futureWait, get, get, getIfAvailable, getOrThrow, isCancelled, isDone, maybeInvokeCallbacks, onCompletion, onError, onSuccess
-
-
-
-
Constructor Detail
-
InternalProcessStanzaSmackFuture
public InternalProcessStanzaSmackFuture()
-
-
Method Detail
-
isNonFatalException
protected abstract boolean isNonFatalException(E exception)
This method checks if the given exception is not fatal. If this method returnsfalse
, then the future will automatically set the given exception as failure reason and notify potential waiting threads.- Parameters:
exception
- the exception to check.- Returns:
true
if the exception is not fatal,false
otherwise.
-
handleStanza
protected abstract void handleStanza(Stanza stanza)
-
processException
public final void processException(E exception)
- Specified by:
processException
in interfaceExceptionCallback<V>
-
processStanza
public final void processStanza(Stanza stanza)
Wrapper method forhandleStanza(Stanza)
. Note that this method issynchronized
.- Specified by:
processStanza
in interfaceStanzaListener
- Parameters:
stanza
- the stanza to process.
-
-