fr.dyade.aaa.agent
Class NGNetwork.MessageVector

java.lang.Object
  extended by fr.dyade.aaa.agent.NGNetwork.MessageVector
Enclosing class:
NGNetwork

final class NGNetwork.MessageVector
extends java.lang.Object


Field Summary
private  int current
          The actual item in this MessageVector object.
private  int elementCount
          The number of valid components in this MessageVector object.
private  Message[] elementData
          The array buffer into which the components of the vector are stored.
 
Constructor Summary
NGNetwork.MessageVector()
          Constructs an empty vector with the specified initial capacity and capacity increment.
 
Method Summary
 void addMessage(Message msg)
          Adds the specified component to the end of this vector, increasing its size by one.
 Message nextMessage()
           
 void removeCurrent()
           
 Message removeMessage(int stamp)
          Removes a message specified by its stamp.
 void reset()
           
 int size()
          Returns the number of message in this vector.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elementData

private Message[] elementData
The array buffer into which the components of the vector are stored. The capacity of the vector is the length of this array buffer, and is at least large enough to contain all the vector's elements.

Any array elements following the last element in the Vector are null.


elementCount

private int elementCount
The number of valid components in this MessageVector object.


current

private int current
The actual item in this MessageVector object.

Constructor Detail

NGNetwork.MessageVector

public NGNetwork.MessageVector()
Constructs an empty vector with the specified initial capacity and capacity increment.

Method Detail

nextMessage

public Message nextMessage()

size

public int size()
Returns the number of message in this vector.

Returns:
the number of message in this vector.

reset

public void reset()

addMessage

public void addMessage(Message msg)
Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity.

Parameters:
msg - the component to be added.

removeCurrent

public void removeCurrent()

removeMessage

public Message removeMessage(int stamp)
Removes a message specified by its stamp. Only remove real message, this method don't touch to acknowledge message.

Parameters:
stamp - the stamp of the message to remove.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.