fipaos.ont.fipa.fipaman
Class APTDescription

java.lang.Object
  |
  +--fipaos.ont.fipa.fipaman.APTDescription
All Implemented Interfaces:
java.io.Serializable

public class APTDescription
extends java.lang.Object
implements java.io.Serializable

The Agent Platform Transport Description forms part of an AP description (see [PC00023]) and is expressed in SL0 TODO: there is at present no checking to see if the characters in the fields are valid as per the BNF definitions

See Also:
Serialized Form

Field Summary
protected  java.util.Set _mtpd
          A set of the message transport protocols
 
Constructor Summary
APTDescription()
          This is the empty constructor.
APTDescription(java.lang.String description)
          Constructs a APTDescription object from a string
 
Method Summary
 boolean addMTPD(MTPDescription mtpd)
          Add a message transport protocol to the list
 boolean contains(java.lang.String name)
          Does the set contain a particular message transport protocol.
 java.util.Set getMTPSSet()
          This method returns the set of message transport protocols
static void main(java.lang.String[] args)
          The main method is for testing purposes
 boolean removeMTPD(MTPDescription mtpd)
          Remove a message transport protocol from the set
 void setMTPSSet(MTPDescription[] mtpd)
          This method sets the message transport protocol set.
 void setMTPSSet(java.util.Set mtpd)
          This method sets the message transport protocol set
 java.lang.String toString()
          A String Representation of this ATPDescription object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_mtpd

protected java.util.Set _mtpd
A set of the message transport protocols
Constructor Detail

APTDescription

public APTDescription()
This is the empty constructor.

APTDescription

public APTDescription(java.lang.String description)
               throws ParserException
Constructs a APTDescription object from a string
Parameters:
description - string representation of a APTDescription object
Throws:
ParserException - if the String is invalid
Method Detail

setMTPSSet

public void setMTPSSet(java.util.Set mtpd)
This method sets the message transport protocol set
Parameters:
mtpd - MTPD to be added to the set

setMTPSSet

public void setMTPSSet(MTPDescription[] mtpd)
This method sets the message transport protocol set.
Parameters:
mtpd - array of MTPDs to be added to the set

getMTPSSet

public java.util.Set getMTPSSet()
This method returns the set of message transport protocols
Returns:
a set of message transport protocols

addMTPD

public boolean addMTPD(MTPDescription mtpd)
Add a message transport protocol to the list
Parameters:
mtpd - the mtpd to be added to the set
Returns:
boolean - true if operation successful, false if not

removeMTPD

public boolean removeMTPD(MTPDescription mtpd)
Remove a message transport protocol from the set
Parameters:
mtpd - remove a MTPD from the set
Returns:
boolean - true if operation successful, false if not.

contains

public boolean contains(java.lang.String name)
Does the set contain a particular message transport protocol. This can be either the profile name or the message transport protocol name
Parameters:
name - the name of message transport protocol or the mtp profile
Returns:
boolean - true if the protocol is in the set, false if not

toString

public java.lang.String toString()
A String Representation of this ATPDescription object
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this ATPDescription object

main

public static void main(java.lang.String[] args)
The main method is for testing purposes
Parameters:
args - Arguments