org.apache.qpid.framing
Class ProtocolInitiation

java.lang.Object
  extended by org.apache.qpid.framing.AMQDataBlock
      extended by org.apache.qpid.framing.ProtocolInitiation
All Implemented Interfaces:
EncodableAMQDataBlock

public class ProtocolInitiation
extends AMQDataBlock
implements EncodableAMQDataBlock


Nested Class Summary
static class ProtocolInitiation.Decoder
           
 
Field Summary
 byte _protocolClass
           
 byte[] _protocolHeader
           
 byte _protocolInstance
           
 byte _protocolMajor
           
 byte _protocolMinor
           
 
Constructor Summary
ProtocolInitiation(byte[] protocolHeader, byte protocolClass, byte protocolInstance, byte protocolMajor, byte protocolMinor)
           
ProtocolInitiation(ByteBuffer in)
           
ProtocolInitiation(ProtocolVersion pv)
           
 
Method Summary
 ProtocolVersion checkVersion()
           
 boolean equals(Object o)
           
 long getSize()
          Get the size of buffer needed to store the byte representation of this frame.
 int hashCode()
           
 String toString()
           
 void writePayload(org.apache.mina.common.ByteBuffer buffer)
          Writes the datablock to the specified buffer.
 void writePayload(ByteBuffer buffer)
           
 
Methods inherited from class org.apache.qpid.framing.AMQDataBlock
toByteBuffer, toNioByteBuffer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_protocolHeader

public final byte[] _protocolHeader

_protocolClass

public final byte _protocolClass

_protocolInstance

public final byte _protocolInstance

_protocolMajor

public final byte _protocolMajor

_protocolMinor

public final byte _protocolMinor
Constructor Detail

ProtocolInitiation

public ProtocolInitiation(byte[] protocolHeader,
                          byte protocolClass,
                          byte protocolInstance,
                          byte protocolMajor,
                          byte protocolMinor)

ProtocolInitiation

public ProtocolInitiation(ProtocolVersion pv)

ProtocolInitiation

public ProtocolInitiation(ByteBuffer in)
Method Detail

writePayload

public void writePayload(org.apache.mina.common.ByteBuffer buffer)
Description copied from class: AMQDataBlock
Writes the datablock to the specified buffer.

Specified by:
writePayload in class AMQDataBlock

getSize

public long getSize()
Description copied from class: AMQDataBlock
Get the size of buffer needed to store the byte representation of this frame.

Specified by:
getSize in class AMQDataBlock
Returns:
unsigned integer

writePayload

public void writePayload(ByteBuffer buffer)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

checkVersion

public ProtocolVersion checkVersion()
                             throws AMQException
Throws:
AMQException

toString

public String toString()
Overrides:
toString in class Object


Licensed to the Apache Software Foundation