org.tranche.flatfile
Class ServerConfiguration

java.lang.Object
  extended by org.tranche.flatfile.ServerConfiguration
All Implemented Interfaces:
java.lang.Comparable

public class ServerConfiguration
extends java.lang.Object
implements java.lang.Comparable

Store information about the Server instance in a configuration object.

Author:
Jayson Falkner - jfalkner@umich.edu

Field Summary
static java.lang.String DFS
          Get the protocol: DFS
static java.lang.String DFS_SSL
          Get the protocol: DFS+SSL
static java.lang.String HTTP
          Get the protocol: HTTP
 
Constructor Summary
ServerConfiguration(java.lang.String type, int port, java.lang.String hostName)
           
 
Method Summary
 ServerConfiguration clone()
          Clone this object.
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getHostName()
          Get the host name associated with this server.
 int getPort()
          Get the port associated with this server.
 java.lang.String getType()
          Get the type (protocol) associated with this server.
 int hashCode()
           
 void setHostName(java.lang.String hostName)
          Set the host name associated with this server.
 void setPort(int port)
          Set the port associated with this server.
 void setType(java.lang.String type)
          Set the type (protocol) associated with this server.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP

public static final java.lang.String HTTP

Get the protocol: HTTP

See Also:
Constant Field Values

DFS

public static final java.lang.String DFS

Get the protocol: DFS

See Also:
Constant Field Values

DFS_SSL

public static final java.lang.String DFS_SSL

Get the protocol: DFS+SSL

See Also:
Constant Field Values
Constructor Detail

ServerConfiguration

public ServerConfiguration(java.lang.String type,
                           int port,
                           java.lang.String hostName)
Parameters:
type -
port -
hostName -
Method Detail

getPort

public int getPort()

Get the port associated with this server.

Returns:

setPort

public void setPort(int port)

Set the port associated with this server.

Parameters:
port -

getType

public java.lang.String getType()

Get the type (protocol) associated with this server.

Returns:

setType

public void setType(java.lang.String type)

Set the type (protocol) associated with this server.

Parameters:
type -

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getHostName

public java.lang.String getHostName()

Get the host name associated with this server.

Returns:

setHostName

public void setHostName(java.lang.String hostName)

Set the host name associated with this server.

Parameters:
hostName -

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

clone

public ServerConfiguration clone()

Clone this object.

Overrides:
clone in class java.lang.Object
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license