openr66.protocol.localhandler.packet
Class AuthentPacket
java.lang.Object
openr66.protocol.localhandler.packet.AbstractLocalPacket
openr66.protocol.localhandler.packet.AuthentPacket
public class AuthentPacket
- extends AbstractLocalPacket
Request Authentication class
header = "hostId" middle = "key bytes" end = localId + way
- Author:
- frederic bregier
AuthentPacket
public AuthentPacket(String hostId,
byte[] key,
Integer newId)
- Parameters:
hostId
- key
- newId
-
createFromBuffer
public static AuthentPacket createFromBuffer(int headerLength,
int middleLength,
int endLength,
org.jboss.netty.buffer.ChannelBuffer buf)
throws OpenR66ProtocolPacketException
- Parameters:
headerLength
- middleLength
- endLength
- buf
-
- Returns:
- the new AuthentPacket from buffer
- Throws:
OpenR66ProtocolPacketException
createEnd
public void createEnd()
throws OpenR66ProtocolPacketException
- Description copied from class:
AbstractLocalPacket
- Prepare the End buffer
- Specified by:
createEnd
in class AbstractLocalPacket
- Throws:
OpenR66ProtocolPacketException
createHeader
public void createHeader()
throws OpenR66ProtocolPacketException
- Description copied from class:
AbstractLocalPacket
- Prepare the Header buffer
- Specified by:
createHeader
in class AbstractLocalPacket
- Throws:
OpenR66ProtocolPacketException
createMiddle
public void createMiddle()
throws OpenR66ProtocolPacketException
- Description copied from class:
AbstractLocalPacket
- Prepare the Middle buffer
- Specified by:
createMiddle
in class AbstractLocalPacket
- Throws:
OpenR66ProtocolPacketException
getType
public byte getType()
- Specified by:
getType
in class AbstractLocalPacket
- Returns:
- the type of Packet
toString
public String toString()
- Specified by:
toString
in class AbstractLocalPacket
getHostId
public String getHostId()
- Returns:
- the hostId
getKey
public byte[] getKey()
- Returns:
- the key
getLocalId
public Integer getLocalId()
- Returns:
- the localId
isToValidate
public boolean isToValidate()
- Returns:
- True if this packet is to be validated
validate
public void validate(boolean isSSL)
- Validate the connection
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.