public class ProtonHandlerImpl extends ProtonInitializable implements ProtonHandler
ProtonHandler.Factory| Modifier and Type | Field and Description |
|---|---|
protected boolean |
dataReceived |
protected boolean |
receivedFirstPacket |
| Constructor and Description |
|---|
ProtonHandlerImpl(Executor dispatchExecutor) |
| Modifier and Type | Method and Description |
|---|---|
ProtonHandler |
addEventHandler(EventHandler handler)
Add an event handler to the chain
|
int |
capacity()
It returns true if the transport connection has any capacity available
|
boolean |
checkDataReceived()
To be used at your discretion to verify if the client was active since you last checked
it can be used to implement server TTL cleanup and verifications
|
protected void |
checkServerSASL() |
void |
close()
It will close the connection and flush events
|
void |
createClientSasl(ClientSASL clientSASL) |
void |
createServerSASL(ServerSASL[] handlers)
To be used on server connections.
|
void |
flush()
It will process the transport and cause events to be called
|
org.apache.qpid.proton.engine.Connection |
getConnection() |
long |
getCreationTime()
Return the creation time of the handler
|
Object |
getLock()
Get the object used to lock transport, connection and events operations
|
SASLResult |
getSASLResult()
To return the SASL Mechanism that was successful with the connection.
|
org.apache.qpid.proton.engine.Transport |
getTransport() |
void |
inputBuffer(io.netty.buffer.ByteBuf buffer)
The input on the Handler.
|
io.netty.buffer.ByteBuf |
outputBuffer()
it will return pending bytes you have on the Transport
after you are done with it you must call
ProtonHandler.outputDone(int) |
void |
outputDone(int bytes)
To be called after you used the outputBuffer
|
long |
tick(boolean firstTick) |
afterInit, initialise, isInitialized, waitWithTimeoutprotected volatile boolean dataReceived
protected boolean receivedFirstPacket
public ProtonHandlerImpl(Executor dispatchExecutor)
public long tick(boolean firstTick)
tick in interface ProtonHandlerpublic int capacity()
ProtonHandlercapacity in interface ProtonHandlerpublic Object getLock()
ProtonHandlergetLock in interface ProtonHandlerpublic org.apache.qpid.proton.engine.Transport getTransport()
getTransport in interface ProtonHandlerpublic org.apache.qpid.proton.engine.Connection getConnection()
getConnection in interface ProtonHandlerpublic ProtonHandler addEventHandler(EventHandler handler)
ProtonHandleraddEventHandler in interface ProtonHandlerpublic void createServerSASL(ServerSASL[] handlers)
ProtonHandlercreateServerSASL in interface ProtonHandlerpublic SASLResult getSASLResult()
ProtonHandlergetSASLResult in interface ProtonHandlerpublic void inputBuffer(io.netty.buffer.ByteBuf buffer)
ProtonHandlerinputBuffer in interface ProtonHandlerpublic boolean checkDataReceived()
ProtonHandlercheckDataReceived in interface ProtonHandlerpublic long getCreationTime()
ProtonHandlergetCreationTime in interface ProtonHandlerpublic void outputDone(int bytes)
ProtonHandleroutputDone in interface ProtonHandlerbytes - number of bytes you used already on the outputpublic io.netty.buffer.ByteBuf outputBuffer()
ProtonHandlerProtonHandler.outputDone(int)outputBuffer in interface ProtonHandlerpublic void createClientSasl(ClientSASL clientSASL)
createClientSasl in interface ProtonHandlerpublic void flush()
ProtonHandlerflush in interface ProtonHandlerpublic void close()
ProtonHandlerclose in interface ProtonHandlerprotected void checkServerSASL()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.