public static class LoginProtocol.DefaultNadProtocol extends Object implements LoginProtocol
Events class, then this protocol will be applied. The 3rd and 4th
bytes of the incoming transmission are searched to get this information.LoginProtocol.CompositeProtocol, LoginProtocol.DefaultNadProtocol, LoginProtocol.HTTPProtocol| Modifier and Type | Field and Description |
|---|---|
private EventDecoder |
eventDecoder |
private int |
frameSize |
private io.netty.handler.codec.LengthFieldPrepender |
lengthFieldPrepender |
private LoginHandler |
loginHandler |
LOGIN_HANDLER_NAME| Constructor and Description |
|---|
LoginProtocol.DefaultNadProtocol() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyProtocol(io.netty.buffer.ByteBuf buffer,
io.netty.channel.ChannelPipeline pipeline)
Apply a protocol on the pipeline to handle login.
|
io.netty.channel.ChannelHandler |
createLengthBasedFrameDecoder() |
EventDecoder |
getEventDecoder() |
int |
getFrameSize() |
io.netty.handler.codec.LengthFieldPrepender |
getLengthFieldPrepender() |
LoginHandler |
getLoginHandler() |
protected boolean |
isNadProtocol(int magic1,
int magic2) |
void |
setEventDecoder(EventDecoder eventDecoder) |
void |
setFrameSize(int frameSize) |
void |
setLengthFieldPrepender(io.netty.handler.codec.LengthFieldPrepender lengthFieldPrepender) |
void |
setLoginHandler(LoginHandler loginHandler) |
private int frameSize
private EventDecoder eventDecoder
private LoginHandler loginHandler
private io.netty.handler.codec.LengthFieldPrepender lengthFieldPrepender
public boolean applyProtocol(io.netty.buffer.ByteBuf buffer,
io.netty.channel.ChannelPipeline pipeline)
LoginProtocolapplyProtocol in interface LoginProtocolbuffer - The incoming buffer, by default around 5 bytes will be read
and passed on to detect the protocolpipeline - The channelpipeline on which the login protocol handlers need
to be set.protected boolean isNadProtocol(int magic1,
int magic2)
public io.netty.channel.ChannelHandler createLengthBasedFrameDecoder()
public int getFrameSize()
public void setFrameSize(int frameSize)
public EventDecoder getEventDecoder()
public void setEventDecoder(EventDecoder eventDecoder)
public LoginHandler getLoginHandler()
public void setLoginHandler(LoginHandler loginHandler)
public io.netty.handler.codec.LengthFieldPrepender getLengthFieldPrepender()
public void setLengthFieldPrepender(io.netty.handler.codec.LengthFieldPrepender lengthFieldPrepender)
Copyright © 2013. All Rights Reserved.