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, waitWithTimeout
protected volatile boolean dataReceived
protected boolean receivedFirstPacket
public ProtonHandlerImpl(Executor dispatchExecutor)
public long tick(boolean firstTick)
tick
in interface ProtonHandler
public int capacity()
ProtonHandler
capacity
in interface ProtonHandler
public Object getLock()
ProtonHandler
getLock
in interface ProtonHandler
public org.apache.qpid.proton.engine.Transport getTransport()
getTransport
in interface ProtonHandler
public org.apache.qpid.proton.engine.Connection getConnection()
getConnection
in interface ProtonHandler
public ProtonHandler addEventHandler(EventHandler handler)
ProtonHandler
addEventHandler
in interface ProtonHandler
public void createServerSASL(ServerSASL[] handlers)
ProtonHandler
createServerSASL
in interface ProtonHandler
public SASLResult getSASLResult()
ProtonHandler
getSASLResult
in interface ProtonHandler
public void inputBuffer(io.netty.buffer.ByteBuf buffer)
ProtonHandler
inputBuffer
in interface ProtonHandler
public boolean checkDataReceived()
ProtonHandler
checkDataReceived
in interface ProtonHandler
public long getCreationTime()
ProtonHandler
getCreationTime
in interface ProtonHandler
public void outputDone(int bytes)
ProtonHandler
outputDone
in interface ProtonHandler
bytes
- number of bytes you used already on the outputpublic io.netty.buffer.ByteBuf outputBuffer()
ProtonHandler
ProtonHandler.outputDone(int)
outputBuffer
in interface ProtonHandler
public void createClientSasl(ClientSASL clientSASL)
createClientSasl
in interface ProtonHandler
public void flush()
ProtonHandler
flush
in interface ProtonHandler
public void close()
ProtonHandler
close
in interface ProtonHandler
protected void checkServerSASL()
Copyright © 2016 The Apache Software Foundation. All rights reserved.