fipaos.ont.fipa.fipaman
Class MTPDescription

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

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

Message Transport Protocol Description TODO: there is at present to checking to see if the characters in the fields are valid as per the BNF definitions

See Also:
Serialized Form

Constructor Summary
MTPDescription()
          Constructor
MTPDescription(java.lang.String description)
          Constructor - given a String representation of the Message Transport Description a mtpdescription will vce constructed from it.
MTPDescription(java.lang.String profile, java.lang.String mtp_name, java.util.List addresses)
          This constructor creates a MTPDescription with the specified profile, mtp-name and addresses.
 
Method Summary
 boolean addAddress(URL address)
          add an address to the list of addresses
 java.util.List getAddresses()
          Get the list of addresses
 java.lang.String getMTPName()
          get the message transport name
 java.lang.String getProfile()
          get the profile
static void main(java.lang.String[] args)
          This is for testing purposes.
 boolean removeAddress(URL address)
          remove an address from the list of addresses
 void setAddresses(java.util.List addresses)
          Set the list of addresses
 void setMTPName(java.lang.String mtp)
          Sets the message transport name
 void setProfile(java.lang.String profile)
          Sets the profile
 java.lang.String toString()
          this object as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MTPDescription

public MTPDescription(java.lang.String profile,
                      java.lang.String mtp_name,
                      java.util.List addresses)
This constructor creates a MTPDescription with the specified profile, mtp-name and addresses.
Parameters:
profile - name of the FIPA transport profile
mtp_name - FIPA name of the MTP being supported
addresses - a list of the transport addresses of this MTP

MTPDescription

public MTPDescription()
Constructor

MTPDescription

public MTPDescription(java.lang.String description)
               throws ParserException
Constructor - given a String representation of the Message Transport Description a mtpdescription will vce constructed from it.
Parameters:
description - String representation of the Message Transport Description
Throws:
ParserException - if the string is not valid
Method Detail

setProfile

public void setProfile(java.lang.String profile)
Sets the profile
Parameters:
profile - the profile

setMTPName

public void setMTPName(java.lang.String mtp)
Sets the message transport name
Parameters:
mtp - the message transport name

setAddresses

public void setAddresses(java.util.List addresses)
Set the list of addresses
Parameters:
addresses - a list of addresses

addAddress

public boolean addAddress(URL address)
add an address to the list of addresses
Parameters:
address - the address to be added
Returns:
as per the list interface

getProfile

public java.lang.String getProfile()
get the profile
Returns:
the profile

getMTPName

public java.lang.String getMTPName()
get the message transport name
Returns:
the message transport name

getAddresses

public java.util.List getAddresses()
Get the list of addresses
Returns:
the list of addresses

removeAddress

public boolean removeAddress(URL address)
remove an address from the list of addresses
Parameters:
address - the address to be removed
Returns:
as per the list interface

toString

public java.lang.String toString()
this object as a string
Overrides:
toString in class java.lang.Object
Returns:
this object as a string

main

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