org.apache.qpid.management.domain.model.type
Class Binary

java.lang.Object
  extended by org.apache.qpid.management.domain.model.type.Binary
All Implemented Interfaces:
Serializable

public final class Binary
extends Object
implements Serializable

It is a simple wrapper for a byte array (for example a 128bin). It is used to let QMan deal with an object instead of an array.

See Also:
Serialized Form

Field Summary
(package private)  org.apache.qpid.management.domain.model.type.Binary.State hashCodeAlreadyComputed
          Internal state of this object used to denote the situation where the hashcode() method has already been computed.
(package private)  org.apache.qpid.management.domain.model.type.Binary.State hashCodeNotYetComputed
          Internal state of this object used to denote the situation when the hashcode() method has never been called.
(package private)  org.apache.qpid.management.domain.model.type.Binary.State state
          Current state (hashcode computation).
 
Constructor Summary
Binary(byte[] bytes)
          Builds a new binary with the given byte array.
 
Method Summary
 void encode(org.apache.qpid.transport.codec.Encoder encoder)
          Encodes the content (wrapped byte array) of this instance using the given encoder.
 boolean equals(Object obj)
           
 long getBankId()
          Returns the bank identifier derived from this object identifier.
 long getBrokerId()
          Returns the broker identifier derived from this object identifier.
 int hashCode()
           
 String toString()
           
 long unpack64(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hashCodeNotYetComputed

org.apache.qpid.management.domain.model.type.Binary.State hashCodeNotYetComputed
Internal state of this object used to denote the situation when the hashcode() method has never been called. After the hashcode has been computed this class switches the state of the outer object to the next state.


hashCodeAlreadyComputed

org.apache.qpid.management.domain.model.type.Binary.State hashCodeAlreadyComputed
Internal state of this object used to denote the situation where the hashcode() method has already been computed. Simply it returns the just computed value for the hashcode.


state

org.apache.qpid.management.domain.model.type.Binary.State state
Current state (hashcode computation).

Constructor Detail

Binary

public Binary(byte[] bytes)
Builds a new binary with the given byte array.

Parameters:
bytes - the wrapped data.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

encode

public void encode(org.apache.qpid.transport.codec.Encoder encoder)
Encodes the content (wrapped byte array) of this instance using the given encoder.

Parameters:
encoder - the encoder used to encode instance content.

toString

public String toString()
Overrides:
toString in class Object

getBankId

public long getBankId()
Returns the bank identifier derived from this object identifier.

Returns:
the bank identifier derived from this object identifier.

getBrokerId

public long getBrokerId()
Returns the broker identifier derived from this object identifier.

Returns:
the broker identifier derived from this object identifier.

unpack64

public final long unpack64(byte[] data)


Licensed to the Apache Software Foundation