ome.system
Class Server

java.lang.Object
  extended by ome.system.Server

public class Server
extends Object

Provides simplified handling of server properties when creating a ServiceFactory. For more complicated uses, Properties can also be used. In which case, the constant strings provided in this class can be used as the keys to the properties instance passed to ServiceFactory.ServiceFactory(Properties).

Since:
1.0
Version:
1.0
Author:
Josh Moore      josh.moore@gmx.de
See Also:
(Internal version: $Rev$ $Date$)

Field Summary
static int DEFAULT_PORT
           
static String OMERO_HOST
          Java property name for use in configuration of the client connection.
static String OMERO_PORT
          Java property name for use in configuration of the client connection.
 
Constructor Summary
Server(String serverHost)
          standard constructor which users DEFAULT_PORT.
Server(String serverHost, int port)
          extended constructor.
 
Method Summary
 Properties asProperties()
          produces a copy of the internal fields as a Properties instance.
 String getHost()
          simple getter for the server host passed into the constructor
 int getPort()
          simple getter for the port passed into the constructor or the default port if none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OMERO_HOST

public static final String OMERO_HOST
Java property name for use in configuration of the client connection.

See Also:
Constant Field Values

OMERO_PORT

public static final String OMERO_PORT
Java property name for use in configuration of the client connection.

See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

Server

public Server(String serverHost)
standard constructor which users DEFAULT_PORT.

Parameters:
server - Not null.

Server

public Server(String serverHost,
              int port)
extended constructor. As with Server(String), serverHost may not be null.

Parameters:
serverHost - Not null.
port -
Method Detail

asProperties

public Properties asProperties()
produces a copy of the internal fields as a Properties instance. Only those keys are present for which a field is non-null.

Returns:
Properties. Not null.

getHost

public String getHost()
simple getter for the server host passed into the constructor

Returns:
host name Not null.

getPort

public int getPort()
simple getter for the port passed into the constructor or the default port if none.



OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.