org.opensubsystems.core.application
Class ServerId

java.lang.Object
  extended by org.opensubsystems.core.application.ServerId

public class ServerId
extends java.lang.Object

This class represents server identification. In general server identification is an IP address of the machine when it is running. But in some cases such we may want to run two servers on the same machine and in that case the IP address is not unique and must be customized by each instance (e.g. using port or some sequence). Therefore this class is used as and abstraction of server identification so that we don't rely that it is only and IP address.

Version:
$Id: ServerId.java,v 1.2 2007/01/07 06:14:39 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Field Summary
protected  java.lang.String m_strServerId
          Identification of the server
protected static ServerId s_defaultServerId
          Id of the default server.
 
Constructor Summary
ServerId()
          Default constructor.
 
Method Summary
static ServerId getInstance()
          Get the default instance of the server id.
 java.lang.String getServerId()
          Get the server id.
 void setServerId(java.lang.String serverId)
          Set new server id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_strServerId

protected java.lang.String m_strServerId
Identification of the server


s_defaultServerId

protected static ServerId s_defaultServerId
Id of the default server.

Constructor Detail

ServerId

public ServerId()
         throws OSSException
Default constructor.

Throws:
OSSException - - an error has occured identifying serverr
Method Detail

getInstance

public static ServerId getInstance()
Get the default instance of the server id.

Returns:
ServerId

getServerId

public java.lang.String getServerId()
Get the server id.

Returns:
String

setServerId

public void setServerId(java.lang.String serverId)
Set new server id.

Parameters:
serverId - - new serverId to set.


Copyright © 2003 - 2006 OpenSubsystems s.r.o.