Package org.jivesoftware.smack
Interface XmppInputOutputFilter
-
public interface XmppInputOutputFilter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
XmppInputOutputFilter.OutputResult
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
closeInputOutput()
java.lang.String
getFilterName()
java.lang.Object
getStats()
java.nio.ByteBuffer
input(java.nio.ByteBuffer inputData)
The returnedByteBuffer
is going to get fliped by the caller.XmppInputOutputFilter.OutputResult
output(java.nio.ByteBuffer outputData, boolean isFinalDataOfElement, boolean destinationAddressChanged, boolean moreDataAvailable)
TheoutputData
argument may be a directByteBuffer
.default void
waitUntilInputOutputClosed()
-
-
-
Method Detail
-
output
XmppInputOutputFilter.OutputResult output(java.nio.ByteBuffer outputData, boolean isFinalDataOfElement, boolean destinationAddressChanged, boolean moreDataAvailable) throws java.io.IOException
TheoutputData
argument may be a directByteBuffer
. The filter has consume the data of the buffer completely. This method must return aXmppInputOutputFilter.OutputResult
. UseXmppInputOutputFilter.OutputResult.NO_OUTPUT
if there is no output.- Parameters:
outputData
- the data this method needs to process.isFinalDataOfElement
- if this is the final data of the element.destinationAddressChanged
- if the destination address has changed.moreDataAvailable
- if more data is available.- Returns:
- a output result.
- Throws:
java.io.IOException
- in case an I/O exception occurs.
-
input
java.nio.ByteBuffer input(java.nio.ByteBuffer inputData) throws java.io.IOException
The returnedByteBuffer
is going to get fliped by the caller. The callee must not flip the buffer.- Parameters:
inputData
- the data this methods needs to process.- Returns:
- a
ByteBuffer
ornull
if no data could be produced. - Throws:
java.io.IOException
- in case an I/O exception occurs.
-
closeInputOutput
default void closeInputOutput()
-
waitUntilInputOutputClosed
default void waitUntilInputOutputClosed() throws java.io.IOException, SmackException.NoResponseException, java.security.cert.CertificateException, java.lang.InterruptedException, SmackException, XMPPException
- Throws:
java.io.IOException
SmackException.NoResponseException
java.security.cert.CertificateException
java.lang.InterruptedException
SmackException
XMPPException
-
getStats
java.lang.Object getStats()
-
getFilterName
java.lang.String getFilterName()
-
-