public interface ChannelHandler<T>
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
ChannelHandler.HandlerType
The enum Handler type.
|
static class |
ChannelHandler.InvokeType
The enum Invoke type.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
caught(Channel channel,
T message,
Throwable exception)
on exception caught.
|
void |
connected(Channel channel)
on channel connected.
|
void |
disconnected(Channel channel)
on channel disconnected.
|
default Executor |
getExecutor()
specify executor for processor handler
|
default ChannelHandler.InvokeType |
getInvokeType()
Select Sync process by reply or Async process by received
|
ChannelHandler.HandlerType |
getType()
check handlerType
|
Class |
interest()
return processor request class name
|
void |
received(Channel channel,
T message)
on message received.
|
Object |
reply(Channel channel,
T message)
on message reply.
|
void connected(Channel channel) throws RemotingException
channel - RemotingExceptionvoid disconnected(Channel channel) throws RemotingException
channel - channel.RemotingExceptionvoid received(Channel channel, T message) throws RemotingException
channel - channel.message - message.RemotingExceptionObject reply(Channel channel, T message) throws RemotingException
channel - message - RemotingExceptionvoid caught(Channel channel, T message, Throwable exception) throws RemotingException
channel - channel.message - message.exception - exception.RemotingExceptionChannelHandler.HandlerType getType()
Class interest()
default ChannelHandler.InvokeType getInvokeType()
default Executor getExecutor()
Copyright © 2023 The Ant Financial. All rights reserved.