org.npsnet.xrti
Class InteractionClassDescriptor

java.lang.Object
  extended byorg.npsnet.xrti.InteractionClassDescriptor
All Implemented Interfaces:
HLAinteractionClassListener

public class InteractionClassDescriptor
extends java.lang.Object
implements HLAinteractionClassListener

Describes an interaction class.

Author:
Andrzej Kapolka

Constructor Summary
InteractionClassDescriptor(DescriptorManager pDescriptorManager, java.lang.String pName, InteractionClassHandle pHandle, HLAinteractionClass pProxy)
          Constructor.
InteractionClassDescriptor(java.lang.String pName, InteractionClassHandle pHandle, java.util.Collection pParentDescriptors, DimensionHandleSet pDimensions, TransportationType pTransportation, OrderType pOrder)
          Constructor.
 
Method Summary
 void addParameterDescriptor(ParameterDescriptor pd)
          Adds a parameter descriptor.
 void dimensionsUpdated(HLAinteractionClass source, java.lang.String oldValue, java.lang.String newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the dimensions attribute has been updated.
 DimensionHandleSet getDimensions()
          Returns the dimensions associated with this interaction class.
 InteractionClassHandle getHandle()
          Returns the handle of this interaction class.
 java.lang.String getName()
          Returns the name of this interaction class.
 OrderType getOrder()
          Returns the order type of this interaction class.
 ParameterDescriptor getParameterDescriptor(ParameterHandle handle)
          Returns the descriptor for the parameter with the given handle.
 ParameterDescriptor getParameterDescriptor(java.lang.String name)
          Returns the descriptor for the parameter with the given name.
 java.util.Collection getParameterDescriptors()
          Returns an immutable collection containing the descriptors of all known parameters.
 java.util.Collection getParentDescriptors()
          Returns the descriptors of this interaction class's parents.
 TransportationType getTransportation()
          Returns the transportation type of this interaction class.
protected  void interactionClassAdded(InteractionClassDescriptor icd)
          Notifies this object that an interaction class of interest has been added to the descriptor manager.
 boolean isPublished()
          Checks whether or not this interaction class is published.
 boolean isSubscribed()
          Checks whether or not this interaction class is subscribed.
 void orderUpdated(HLAinteractionClass source, HLAorderType oldValue, HLAorderType newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the order attribute has been updated.
protected  void parameterAdded(ParameterDescriptor pd)
          Notifies this object that a parameter of interest has been added to the descriptor manager.
 void parametersUpdated(HLAinteractionClass source, long[] oldValue, long[] newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the parameters attribute has been updated.
 void parentsUpdated(HLAinteractionClass source, java.lang.String oldValue, java.lang.String newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the parents attribute has been updated.
 void removeParameterDescriptor(ParameterDescriptor pd)
          Removes a parameter descriptor.
 void semanticsUpdated(HLAinteractionClass source, java.lang.String oldValue, java.lang.String newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the semantics attribute has been updated.
 void setOrder(OrderType pOrder)
          Sets the order type of this interaction class.
 void setPublished(boolean pPublished)
          Sets whether or not this interaction class is published.
 void setSubscribed(boolean pSubscribed)
          Sets whether or not this interaction class is subscribed.
 void setTransportation(TransportationType pTransportation)
          Sets the transportation type of this interaction class.
 void sharingUpdated(HLAinteractionClass source, HLAsharingType oldValue, HLAsharingType newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the sharing attribute has been updated.
 void transportationUpdated(HLAinteractionClass source, java.lang.String oldValue, java.lang.String newValue, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the listener that the transportation attribute has been updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionClassDescriptor

public InteractionClassDescriptor(java.lang.String pName,
                                  InteractionClassHandle pHandle,
                                  java.util.Collection pParentDescriptors,
                                  DimensionHandleSet pDimensions,
                                  TransportationType pTransportation,
                                  OrderType pOrder)
Constructor.

Parameters:
pName - the name of the interaction class
pHandle - the handle of the interaction class
pParentDescriptors - the descriptors of the interaction class's parents
pDimensions - the dimensions associated with the interaction class
pTransportation - the transportation type of the interaction class
pOrder - the order type of the interaction class

InteractionClassDescriptor

public InteractionClassDescriptor(DescriptorManager pDescriptorManager,
                                  java.lang.String pName,
                                  InteractionClassHandle pHandle,
                                  HLAinteractionClass pProxy)
Constructor.

Parameters:
pDescriptorManager -
pName - the name of the interaction class
pHandle - the handle of the interaction class
pProxy - the proxy corresponding to a remote object
Method Detail

interactionClassAdded

protected void interactionClassAdded(InteractionClassDescriptor icd)
Notifies this object that an interaction class of interest has been added to the descriptor manager.

Parameters:
icd - the interaction class descriptor

parameterAdded

protected void parameterAdded(ParameterDescriptor pd)
Notifies this object that a parameter of interest has been added to the descriptor manager.

Parameters:
pd - the parameter descriptor

getName

public java.lang.String getName()
Returns the name of this interaction class.

Returns:
the name of this interaction class

getHandle

public InteractionClassHandle getHandle()
Returns the handle of this interaction class.

Returns:
the handle of this interaction class

getParentDescriptors

public java.util.Collection getParentDescriptors()
Returns the descriptors of this interaction class's parents.

Returns:
the descriptors of this interaction class's parents

getDimensions

public DimensionHandleSet getDimensions()
Returns the dimensions associated with this interaction class.

Returns:
the dimensions associated with this interaction class

setTransportation

public void setTransportation(TransportationType pTransportation)
Sets the transportation type of this interaction class.

Parameters:
pTransportation - the new transportation type for this interaction class

getTransportation

public TransportationType getTransportation()
Returns the transportation type of this interaction class.

Returns:
the transportation type of this interaction class

setOrder

public void setOrder(OrderType pOrder)
Sets the order type of this interaction class.

Parameters:
pOrder - the new order type for this interaction class

getOrder

public OrderType getOrder()
Returns the order type of this interaction class.

Returns:
the order type of this interaction class

setPublished

public void setPublished(boolean pPublished)
Sets whether or not this interaction class is published.

Parameters:
pPublished - whether or not this interaction class is published

isPublished

public boolean isPublished()
Checks whether or not this interaction class is published.

Returns:
whether or not this interaction class is published

setSubscribed

public void setSubscribed(boolean pSubscribed)
Sets whether or not this interaction class is subscribed.


isSubscribed

public boolean isSubscribed()
Checks whether or not this interaction class is subscribed.

Returns:
whether or not this interaction class is subscribed

addParameterDescriptor

public void addParameterDescriptor(ParameterDescriptor pd)
Adds a parameter descriptor.

Parameters:
pd - the parameter descriptor to add

removeParameterDescriptor

public void removeParameterDescriptor(ParameterDescriptor pd)
Removes a parameter descriptor.

Parameters:
pd - the parameter descriptor to remove

getParameterDescriptor

public ParameterDescriptor getParameterDescriptor(java.lang.String name)
Returns the descriptor for the parameter with the given name. First searches the parameters of this class, then the parameters of the parent classes.

Parameters:
name - the name of the parameter
Returns:
the parameter descriptor, or null if no such descriptor exists

getParameterDescriptor

public ParameterDescriptor getParameterDescriptor(ParameterHandle handle)
Returns the descriptor for the parameter with the given handle. First searches the parameters of this class, then the parameters of the parent classes.

Parameters:
handle - the handle of the parameter
Returns:
the parameter descriptor, or null if no such descriptor exists

getParameterDescriptors

public java.util.Collection getParameterDescriptors()
Returns an immutable collection containing the descriptors of all known parameters. Each element of the collection will be a ParameterDescriptor.

Returns:
an immutable collection containing the descriptors of all known parameters

parentsUpdated

public void parentsUpdated(HLAinteractionClass source,
                           java.lang.String oldValue,
                           java.lang.String newValue,
                           byte[] userSuppliedTag,
                           OrderType sentOrdering,
                           TransportationType theTransport)
Notifies the listener that the parents attribute has been updated.

Specified by:
parentsUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

sharingUpdated

public void sharingUpdated(HLAinteractionClass source,
                           HLAsharingType oldValue,
                           HLAsharingType newValue,
                           byte[] userSuppliedTag,
                           OrderType sentOrdering,
                           TransportationType theTransport)
Notifies the listener that the sharing attribute has been updated.

Specified by:
sharingUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

dimensionsUpdated

public void dimensionsUpdated(HLAinteractionClass source,
                              java.lang.String oldValue,
                              java.lang.String newValue,
                              byte[] userSuppliedTag,
                              OrderType sentOrdering,
                              TransportationType theTransport)
Notifies the listener that the dimensions attribute has been updated.

Specified by:
dimensionsUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

transportationUpdated

public void transportationUpdated(HLAinteractionClass source,
                                  java.lang.String oldValue,
                                  java.lang.String newValue,
                                  byte[] userSuppliedTag,
                                  OrderType sentOrdering,
                                  TransportationType theTransport)
Notifies the listener that the transportation attribute has been updated.

Specified by:
transportationUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

orderUpdated

public void orderUpdated(HLAinteractionClass source,
                         HLAorderType oldValue,
                         HLAorderType newValue,
                         byte[] userSuppliedTag,
                         OrderType sentOrdering,
                         TransportationType theTransport)
Notifies the listener that the order attribute has been updated.

Specified by:
orderUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

parametersUpdated

public void parametersUpdated(HLAinteractionClass source,
                              long[] oldValue,
                              long[] newValue,
                              byte[] userSuppliedTag,
                              OrderType sentOrdering,
                              TransportationType theTransport)
Notifies the listener that the parameters attribute has been updated.

Specified by:
parametersUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update

semanticsUpdated

public void semanticsUpdated(HLAinteractionClass source,
                             java.lang.String oldValue,
                             java.lang.String newValue,
                             byte[] userSuppliedTag,
                             OrderType sentOrdering,
                             TransportationType theTransport)
Notifies the listener that the semantics attribute has been updated.

Specified by:
semanticsUpdated in interface HLAinteractionClassListener
Parameters:
source - the source of the notification
oldValue - the old value of the attribute
newValue - the new value of the attribute
userSuppliedTag - the user-supplied tag associated with the update
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update