abstract class ConnectionFlowStep extends Object
ConnectionFlow.| 限定符和类型 | 字段和说明 |
|---|---|
private ProxyConnection |
connection |
private ProxyConnectionLogger |
LOG |
private ConnectionState |
state |
| 构造器和说明 |
|---|
ConnectionFlowStep(ProxyConnection connection,
ConnectionState state)
Construct a new step in a connection flow.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract io.netty.util.concurrent.Future |
execute()
Implement this method to actually do the work involved in this step of the flow.
|
(专用程序包) ProxyConnection |
getConnection() |
(专用程序包) ConnectionState |
getState() |
(专用程序包) void |
onSuccess(ConnectionFlow flow)
When the flow determines that this step was successful, it calls into this method.
|
(专用程序包) void |
read(ConnectionFlow flow,
Object msg)
Any messages that are read from the underlying connection while we're at this step of the connection flow are
passed to this method.
|
(专用程序包) boolean |
shouldExecuteOnEventLoop()
Indicates whether or not this step should be executed on the channel's event loop.
|
(专用程序包) boolean |
shouldSuppressInitialRequest()
Indicates whether or not to suppress the initial request.
|
String |
toString() |
private final ProxyConnectionLogger LOG
private final ProxyConnection connection
private final ConnectionState state
ConnectionFlowStep(ProxyConnection connection, ConnectionState state)
connection - the connection that we're working onstate - the state that the connection will show while we're processing this stepProxyConnection getConnection()
ConnectionState getState()
boolean shouldSuppressInitialRequest()
boolean shouldExecuteOnEventLoop()
Indicates whether or not this step should be executed on the channel's event loop. Defaults to true, can be overridden.
If this step modifies the pipeline, for example by adding/removing handlers, it's best to make it execute on the event loop.
protected abstract io.netty.util.concurrent.Future execute()
void onSuccess(ConnectionFlow flow)
flow - connection flowvoid read(ConnectionFlow flow, Object msg)
Any messages that are read from the underlying connection while we're at this step of the connection flow are passed to this method.
The default implementation ignores the message and logs this, since we weren't really expecting a message here.
Some ConnectionFlowSteps do need to read the messages, so they override this method as appropriate.
flow - our ConnectionFlowmsg - the message read from the underlying connectionCopyright © 2021 Zodiac. All rights reserved.