zeus.concepts
Class ZeusAddress

java.lang.Object
  extended byzeus.concepts.ZeusAddress
All Implemented Interfaces:
Address

public class ZeusAddress
extends java.lang.Object
implements Address


Field Summary
private  java.lang.String host
           
private  java.lang.String name
           
private  int port
           
private  java.lang.String type
           
 
Constructor Summary
ZeusAddress(Address addr)
           
ZeusAddress(java.lang.String name, java.lang.String host, int port, java.lang.String type)
           
 
Method Summary
 boolean equals(Address addr)
          is this the same as another address?
 java.lang.String getHost()
          getHost returns the name of the host that the agent that has this address is currently present on
 java.lang.String getName()
          getName returns the name of the agent that has this address
 int getPort()
          getPort returns the port that is listened to by the transport mechanism for the agent in the case of FIPA-IIOP agents this will generally be "900", as this is the default IIOP port number, FIPA-HTTP agents the port number might be "8080" for instance
 java.lang.String getType()
          getType is a Zeus specific method, in Zeus it is used to denote "ANS" or "FACILITATOR".
 boolean sameAddress(Address addr)
          returns true if these two agents share a machine and port - ie. they both live at the same address.... ahhh sweeeet.
 void setName(java.lang.String name)
          set the name field
 void setType(java.lang.String type)
          allow the type to be manipulated
 java.lang.String toString()
          produce a nice string version of the address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

host

private java.lang.String host

port

private int port

type

private java.lang.String type
Constructor Detail

ZeusAddress

public ZeusAddress(java.lang.String name,
                   java.lang.String host,
                   int port,
                   java.lang.String type)

ZeusAddress

public ZeusAddress(Address addr)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Address
getName returns the name of the agent that has this address

Specified by:
getName in interface Address

getHost

public java.lang.String getHost()
Description copied from interface: Address
getHost returns the name of the host that the agent that has this address is currently present on

Specified by:
getHost in interface Address

getType

public java.lang.String getType()
Description copied from interface: Address
getType is a Zeus specific method, in Zeus it is used to denote "ANS" or "FACILITATOR". Non Zeus agents should be typed as "FIPA-IIOP" or "LEAP" for example. Other types of agent may be implemented if other addressing is used i.e. "LDAP"

Specified by:
getType in interface Address

getPort

public int getPort()
Description copied from interface: Address
getPort returns the port that is listened to by the transport mechanism for the agent in the case of FIPA-IIOP agents this will generally be "900", as this is the default IIOP port number, FIPA-HTTP agents the port number might be "8080" for instance

Specified by:
getPort in interface Address

equals

public boolean equals(Address addr)
Description copied from interface: Address
is this the same as another address? The behaviour should be that if a FIPA-IIOP agent of name X is present on host Y and also there is a FIPA-HTTP X,Y then FIPA-IIOP == FIPA-HTTP (if you follow my thread) However, since the implementation is left to others don't be surprised if this always returns false or something dumb like that...

Specified by:
equals in interface Address

sameAddress

public boolean sameAddress(Address addr)
Description copied from interface: Address
returns true if these two agents share a machine and port - ie. they both live at the same address.... ahhh sweeeet.

Specified by:
sameAddress in interface Address

toString

public java.lang.String toString()
Description copied from interface: Address
produce a nice string version of the address. The string produced MUST be in a format that can be parsed.

Specified by:
toString in interface Address

setName

public void setName(java.lang.String name)
Description copied from interface: Address
set the name field

Specified by:
setName in interface Address

setType

public void setType(java.lang.String type)
allow the type to be manipulated

Specified by:
setType in interface Address


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.