AbstractPacketReader (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.message.AbstractPacketReader class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.message
Class AbstractPacketReader

    java.lang.Object
      org.codehaus.activemq.message.AbstractPacketReader

All Implemented Interfaces:
  PacketReader

Direct Known Subclasses:
  ActiveMQMessageReader, BrokerInfoReader, CapacityInfoReader, CapacityInfoRequestReader, ConnectionInfoReader, ConsumerInfoReader, DurableUnsubscribeReader, MessageAckReader, ProducerInfoReader, ReceiptReader, SessionInfoReader, TransactionInfoReader, WireFormatInfoReader, XATransactionInfoReader

public abstract class AbstractPacketReader
extends Object
implements PacketReader

Allows instances implementing Packet interface to be deserailized

Version:
  $Revision: 1.12 $

Constructor Summary
`AbstractPacketReader()`

Method Summary
`void` | `buildPacket(Packet p, DataInput dataIn)` build a Packet instance from the data input stream
`boolean` | `canRead(int packetType)`
`protected Object` | `readObject(DataInput dataIn)` ;
`Packet` | `readPacketFromByteArray(byte[] data)` Deserailizes a Packet from a byte array
`protected String` | `readUTF(DataInput dataIn)` pointless method - but mirrors writer

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.codehaus.activemq.message.PacketReader
`createPacket, getPacketType`

Constructor Detail

### AbstractPacketReader

    public AbstractPacketReader()

Method Detail

### canRead

    public boolean canRead(int packetType)

  Specified by:
    `canRead` in interface `PacketReader`
  Parameters:
    `packetType` -
  Returns:
    true if this PacketReader can a Packet of this type

### readUTF

    protected String readUTF(DataInput dataIn)
                      throws IOException

  pointless method - but mirrors writer

  Parameters:
    `dataIn` -
  Returns:
    the String
  Throws:
    `IOException`

### readObject

    protected Object readObject(DataInput dataIn)
                         throws IOException

  ;

  Parameters:
    `dataIn` -
  Returns:
    object
  Throws:
    `IOException`

### buildPacket

    public void buildPacket(Packet p,
                            DataInput dataIn)
                     throws IOException

  build a Packet instance from the data input stream

  Specified by:
    `buildPacket` in interface `PacketReader`
  Parameters:
    `p` - A Packet object
    `dataIn` - the data input stream to build the packet from
  Throws:
    `IOException`

### readPacketFromByteArray

    public Packet readPacketFromByteArray(byte[] data)
                                   throws IOException

  Deserailizes a Packet from a byte array

  Specified by:
    `readPacketFromByteArray` in interface `PacketReader`
  Parameters:
    `data` -
  Returns:
    the deserialized Packet
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.