public class MemberChannelInitializer extends Object implements com.hazelcast.internal.networking.ChannelInitializer
ChannelInitializer
that runs on a member. It will identify the channel based on the protocol.
If the channel is a 'client', it will automatically send the cluster protocol to the other side since both are members. This
way the 'server' knows what it is dealing with.
If the channel is a 'server', it needs to wait sending any information before the 'client' has send the protocol. If the
'client' is another member, it receives the cluster protocol. If the client is a true client, we don't send anything.
If the channel is a 'server' and the client is ASCII client, it will not receive a specific ASCII protocol; if the
first 3 bytes are not a known protocol, it will be interpreted as an ASCII (TextCommand) request.Constructor and Description |
---|
MemberChannelInitializer(ILogger logger,
IOService ioService) |
Modifier and Type | Method and Description |
---|---|
com.hazelcast.internal.networking.InitResult<com.hazelcast.internal.networking.ChannelInboundHandler> |
initInbound(com.hazelcast.internal.networking.Channel channel)
Called when the Channel receives the first data.
|
com.hazelcast.internal.networking.InitResult<com.hazelcast.internal.networking.ChannelOutboundHandler> |
initOutbound(com.hazelcast.internal.networking.Channel channel)
called when 'client' side member connects; will call with protocol "MEMBER'
indirectly called 'server' side when the 'client' has told the protocol.
|
public com.hazelcast.internal.networking.InitResult<com.hazelcast.internal.networking.ChannelInboundHandler> initInbound(com.hazelcast.internal.networking.Channel channel) throws IOException
com.hazelcast.internal.networking.ChannelInitializer
ChannelInitializer.initOutbound(Channel)
.initInbound
in interface com.hazelcast.internal.networking.ChannelInitializer
channel
- the Channel
that requires initializationIOException
public com.hazelcast.internal.networking.InitResult<com.hazelcast.internal.networking.ChannelOutboundHandler> initOutbound(com.hazelcast.internal.networking.Channel channel)
initOutbound
in interface com.hazelcast.internal.networking.ChannelInitializer
channel
- the Channel
that requires initializationCopyright © 2018 Hazelcast, Inc.. All rights reserved.