fipaos.ont.fipa.fipaman
Class MTPDescription


public class MTPDescription
implements 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




Constructor Summary
MTPDescription(String profile, String mtp_name, List addresses)
          This constructor creates a MTPDescription with the specified profile, mtp-name and addresses.
MTPDescription()
          Constructor
MTPDescription(String description)
          Constructor - given a String representation of the Message Transport Description a mtpdescription will vce constructed from it.

Method Summary
 booleanaddAddress(URL address)
          add an address to the list of addresses
 ListgetAddresses()
          Get the list of addresses
 StringgetMTPName()
          get the message transport name
 StringgetProfile()
          get the profile
 static voidmain(String[] args)
          This is for testing purposes.
 booleanremoveAddress(URL address)
          remove an address from the list of addresses
 voidsetAddresses(List addresses)
          Set the list of addresses
 voidsetMTPName(String mtp)
          Sets the message transport name
 voidsetProfile(String profile)
          Sets the profile
 StringtoString()
          this object as a string

Constructor Detail

MTPDescription

public MTPDescription(String profile, String mtp_name, 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(String description)
throws fipaos.parser.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

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

getAddresses

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

getMTPName

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

getProfile

public String getProfile()
get the profile
Returns: the profile

main

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

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

setAddresses

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

setMTPName

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

setProfile

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

toString

public String toString()
this object as a string
Returns: this object as a string

Association Links

to Class java.lang.String

to Class java.lang.String

to Class java.util.List