Package rocks.xmpp.core.net
Class ReaderInterceptorChain
- java.lang.Object
-
- rocks.xmpp.core.net.ReaderInterceptorChain
-
public final class ReaderInterceptorChain extends Object
An interceptor chain, which manages the sequential processing of multiple interceptors.- See Also:
ReaderInterceptor
,WriterInterceptorChain
-
-
Constructor Summary
Constructors Constructor Description ReaderInterceptorChain(Iterable<ReaderInterceptor> readerInterceptors, Session session, Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
getConnection()
Gets the connection to which the interceptor chain is applied.Session
getSession()
Gets the session.void
proceed(Reader reader, Consumer<StreamElement> streamElement)
Proceeds to the next interceptor if present.
-
-
-
Constructor Detail
-
ReaderInterceptorChain
public ReaderInterceptorChain(Iterable<ReaderInterceptor> readerInterceptors, Session session, Connection connection)
-
-
Method Detail
-
proceed
public void proceed(Reader reader, Consumer<StreamElement> streamElement) throws Exception
Proceeds to the next interceptor if present.- Parameters:
reader
- The reader.streamElement
- Consumes the read stream element.- Throws:
Exception
- Any exception happening during interception.
-
getSession
public final Session getSession()
Gets the session.- Returns:
- The session.
-
getConnection
public final Connection getConnection()
Gets the connection to which the interceptor chain is applied.- Returns:
- The connection.
-
-