public static class LoginProtocol.DefaultJetProtocol 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.DefaultJetProtocol, LoginProtocol.HTTPProtocol
Modifier and Type | Field and Description |
---|---|
private EventDecoder |
eventDecoder |
private int |
frameSize |
private org.jboss.netty.handler.codec.frame.LengthFieldPrepender |
lengthFieldPrepender |
private LoginHandler |
loginHandler |
LOGIN_HANDLER_NAME
Constructor and Description |
---|
LoginProtocol.DefaultJetProtocol() |
Modifier and Type | Method and Description |
---|---|
boolean |
applyProtocol(org.jboss.netty.buffer.ChannelBuffer buffer,
org.jboss.netty.channel.ChannelPipeline pipeline)
Apply a protocol on the pipeline to handle login.
|
org.jboss.netty.channel.ChannelHandler |
createLengthBasedFrameDecoder() |
EventDecoder |
getEventDecoder() |
int |
getFrameSize() |
org.jboss.netty.handler.codec.frame.LengthFieldPrepender |
getLengthFieldPrepender() |
LoginHandler |
getLoginHandler() |
protected boolean |
isJetProtocol(int magic1,
int magic2) |
void |
setEventDecoder(EventDecoder eventDecoder) |
void |
setFrameSize(int frameSize) |
void |
setLengthFieldPrepender(org.jboss.netty.handler.codec.frame.LengthFieldPrepender lengthFieldPrepender) |
void |
setLoginHandler(LoginHandler loginHandler) |
private int frameSize
private EventDecoder eventDecoder
private LoginHandler loginHandler
private org.jboss.netty.handler.codec.frame.LengthFieldPrepender lengthFieldPrepender
public boolean applyProtocol(org.jboss.netty.buffer.ChannelBuffer buffer, org.jboss.netty.channel.ChannelPipeline pipeline)
LoginProtocol
applyProtocol
in interface LoginProtocol
buffer
- 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 isJetProtocol(int magic1, int magic2)
public org.jboss.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 org.jboss.netty.handler.codec.frame.LengthFieldPrepender getLengthFieldPrepender()
public void setLengthFieldPrepender(org.jboss.netty.handler.codec.frame.LengthFieldPrepender lengthFieldPrepender)
Copyright © 2013. All Rights Reserved.