Java EE 5 SDK

com.sun.appserv.management.client.prefs
Class LoginInfo

java.lang.Object
  extended by com.sun.appserv.management.client.prefs.LoginInfo
All Implemented Interfaces:
Comparable<LoginInfo>

public final class LoginInfo
extends Object
implements Comparable<LoginInfo>

An immutable class that represents an arbitrary LoginInfo for Appserver Administration Client. A LoginInfo is specific to an admin host and admin port. Thus, with this scheme, there can be at the most one LoginInfo for an operating system user of Appserver, for a given admin host and admin port.

Since:
Appserver 9.0

Constructor Summary
LoginInfo(String host, int port, String user, String password)
          Creates an Immutable instance of a LoginInfo from given 4-tuple.
 
Method Summary
 int compareTo(LoginInfo that)
           
 boolean equals(Object other)
           
 String getHost()
           
 String getPassword()
           
 int getPort()
           
 String getUser()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoginInfo

public LoginInfo(String host,
                 int port,
                 String user,
                 String password)
Creates an Immutable instance of a LoginInfo from given 4-tuple. The host, user and password may not be null. The port may not be a negative integer.

Parameters:
host - String representing host
port - integer representing port
user - String representing user
password - String representing password
Throws:
IllegalArgumentException - if parameter contract is violated
Method Detail

getHost

public String getHost()

getPort

public int getPort()

getUser

public String getUser()

getPassword

public String getPassword()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(LoginInfo that)
Specified by:
compareTo in interface Comparable<LoginInfo>

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.