com.tivoli.pd.jadmin
Class PDSvrInfo

java.lang.Object
  extended by com.tivoli.pd.jadmin.PDSvrInfo
All Implemented Interfaces:
java.lang.Cloneable

public class PDSvrInfo
extends java.lang.Object
implements java.lang.Cloneable

This class encapsulates the location (host name and port number) and preference ranking of a Security Access Manager server entry in an application server's configuration file. An instance of this class can represent either a policy server or an authorization server.

Modes: Local,Remote


Constructor Summary
PDSvrInfo(java.lang.String host, int port, int rank, java.util.Locale locale, PDMessages messages)
          Construct a PDSvrInfo with the input host, port number and rank.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 boolean equals(java.lang.Object obj)
          Determines whether this PDSvrInfo is equivalent to the input object.
 java.lang.String getHost()
          Returns the name of the host that this Security Access Manager server runs on.
 int getPort()
          Returns the TCP/IP port that this Security Access Manager server communicates on.
 int getRank()
          Returns the preference rank assigned to this Security Access Manager server.
 void setHost(java.lang.String host, PDMessages messages)
          Sets the name of the host that this Security Access Manager server runs on.
 void setPort(int port, PDMessages messages)
          Sets the TCP/IP port that this Security Access Manager server communicates on.
 void setRank(int rank, PDMessages messages)
          Sets the preference rank of this Security Access Manager server.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDSvrInfo

public PDSvrInfo(java.lang.String host,
                 int port,
                 int rank,
                 java.util.Locale locale,
                 PDMessages messages)
          throws PDException
Construct a PDSvrInfo with the input host, port number and rank.

Parameters:
host - the host name of the machine on which the Security Access Manager server is running. This should be a fully-qualified Domain Name Service (DNS) host name. Cannot be null or empty.
port - the TCP/IP port on which the Security Access Manager server is listening. Must be greater than 0.
rank - the rank of the server with respect to other servers of its type in a configuration file. Servers are ranked in ascending order, so that a server with rank 1 has a higher preference than a server with rank 2. Must be a positive number.
locale - the locale into which any generated error or warning messages are translated. Cannot be null.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output. Cannot be null.
Throws:
PDException - if an error occurs. This exception might contain error and message codes defined in the product Error Message Reference document.
Method Detail

getHost

public java.lang.String getHost()
                         throws PDException
Returns the name of the host that this Security Access Manager server runs on.

Throws:
PDException

getPort

public int getPort()
            throws PDException
Returns the TCP/IP port that this Security Access Manager server communicates on.

Throws:
PDException

getRank

public int getRank()
            throws PDException
Returns the preference rank assigned to this Security Access Manager server.

Throws:
PDException

setHost

public void setHost(java.lang.String host,
                    PDMessages messages)
             throws PDException
Sets the name of the host that this Security Access Manager server runs on.

Parameters:
host - the host name of the machine on which the Security Access Manager server is running. This should be a fully-qualified Domain Name Service (DNS) host name. Cannot be null or empty.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output. The messages will be translated into the locale used when this object was instantiated. Cannot be null.
Throws:
PDException - if an error occurs. This exception might contain error and message codes defined in the product Error Message Reference document.

setPort

public void setPort(int port,
                    PDMessages messages)
             throws PDException
Sets the TCP/IP port that this Security Access Manager server communicates on.

Parameters:
port - the TCP/IP port on which the Security Access Manager server is listening. Must be greater than 0.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output. The messages will be translated into the locale used when this object was instantiated. Cannot be null.
Throws:
PDException - if an error occurs. This exception might contain error and message codes defined in the product Error Message Reference document.

setRank

public void setRank(int rank,
                    PDMessages messages)
             throws PDException
Sets the preference rank of this Security Access Manager server.

Parameters:
rank - the rank of the server with respect to other servers of its type in a configuration file. Servers are ranked in ascending order, so that a server with rank 1 has a higher preference than a server with rank 2. Must be a positive number.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output. The messages will be translated into the locale used when this object was instantiated. Cannot be null.
Throws:
PDException - if an error occurs. This exception might contain error and message codes defined in the product Error Message Reference document.

equals

public boolean equals(java.lang.Object obj)
Determines whether this PDSvrInfo is equivalent to the input object.

Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Returns a copy of this object.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class java.lang.Object