ice.net
Class ConnectionRoute

java.lang.Object
  extended byice.net.ConnectionRoute
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Direct, Indirect

public abstract class ConnectionRoute
extends Object
implements Serializable

Since:
1.5
Version:
1.5
Author:
Jack van Ooststroom
See Also:
Serialized Form

Field Summary
static int KNOWN_BAD
          Indicates that the status of the ConnectionRoute is known to be bad.
static int KNOWN_GOOD
          Indicates that the status of the ConnectionRoute is known to be good.
static int UNTESTED
          Indicates that the status of the ConnectionRoute is untested.
 
Constructor Summary
protected ConnectionRoute()
          Constructs an empty ConnectionRoute.
 
Method Summary
protected  void checkStatus(int status)
          Convenience method to check the specified status for validity.
 boolean equals(Object object)
           
 URL getRequestedUrl()
          Returns the requested URL of this ConnectionRoute.
 int getStatus()
          Returns the status of this ConnectionRoute.
 void setRequestedUrl(URL requestedUrl)
          Sets this ConnectionRoute's requested URL to the specified requestedUrl.
 void setStatus(int status)
          Sets this ConnectionRoute's status to the specified status.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNTESTED

public static final int UNTESTED

Indicates that the status of the ConnectionRoute is untested.

See Also:
Constant Field Values

KNOWN_GOOD

public static final int KNOWN_GOOD

Indicates that the status of the ConnectionRoute is known to be good. That is, the last time the connection route was tested successfully.

See Also:
Constant Field Values

KNOWN_BAD

public static final int KNOWN_BAD

Indicates that the status of the ConnectionRoute is known to be bad. That is, the last time the connection route was tested unsuccessfully.

See Also:
Constant Field Values
Constructor Detail

ConnectionRoute

protected ConnectionRoute()

Constructs an empty ConnectionRoute.

Method Detail

equals

public boolean equals(Object object)

getRequestedUrl

public final URL getRequestedUrl()

Returns the requested URL of this ConnectionRoute.

Returns:
the requested URL.
See Also:
setRequestedUrl(URL)

getStatus

public int getStatus()

Returns the status of this ConnectionRoute.

Returns:
the status.
See Also:
setStatus(int), UNTESTED, KNOWN_GOOD, KNOWN_BAD

setRequestedUrl

public final void setRequestedUrl(URL requestedUrl)
                           throws IllegalArgumentException

Sets this ConnectionRoute's requested URL to the specified requestedUrl.

Parameters:
requestedUrl - the new requested URL.
Throws:
IllegalArgumentException - if the specified requestedUrl is null.
See Also:
getRequestedUrl()

setStatus

public void setStatus(int status)

Sets this ConnectionRoute's status to the specified status.

Parameters:
status - the new status.
See Also:
getStatus(), UNTESTED, KNOWN_GOOD, KNOWN_BAD

checkStatus

protected final void checkStatus(int status)
                          throws IllegalArgumentException

Convenience method to check the specified status for validity.

The specified status is only valid if it is one of the following:

Parameters:
status - the status to be checked.
Throws:
IllegalArgumentException - if the specified status is not equal to UNTESTED, KNOWN_GOOD and KNOWN_BAD.