public class ServerHandshakeHandler
extends io.netty.channel.ChannelDuplexHandler
Constructor and Description |
---|
ServerHandshakeHandler(UUID nodeId,
String corfuVersion,
String timeoutInSeconds)
Creates a new ServerHandshakeHandler which will handle the handshake--initiated by a client
on the server side.
|
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx)
Channel event that is triggered when a new connected channel is created.
|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
Channel event that is triggered when the channel is closed.
|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object m)
Read data from the Channel.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
Channel event that is triggered when an exception is caught.
|
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
Channel event that is triggered when an outbound handler attempts to write into the channel.
|
bind, close, connect, deregister, disconnect, flush, read
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public ServerHandshakeHandler(UUID nodeId, String corfuVersion, String timeoutInSeconds)
nodeId
- Current Server Node Identifier.corfuVersion
- Version of Corfu in Server Node.public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object m) throws Exception
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
ctx
- channel handler contextm
- object received in inbound bufferException
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
ctx
- channel handler contextException
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
ctx
- channel handler contextException
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
ctx
- channel handler contextcause
- exception causeException
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelDuplexHandler
ctx
- channel handler contextmsg
- message written into channelpromise
- channel promiseException
Copyright © 2019 CorfuDB. All rights reserved.