public class Server
extends java.lang.Object
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(Properties)
.ServiceFactory
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
static java.lang.String |
OMERO_HOST
Java property name for use in configuration of the client connection.
|
static java.lang.String |
OMERO_PORT
Java property name for use in configuration of the client connection.
|
Constructor and Description |
---|
Server(java.lang.String serverHost)
standard constructor which users
DEFAULT_PORT . |
Server(java.lang.String serverHost,
int port)
extended constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Properties |
asProperties()
produces a copy of the internal fields as a
Properties
instance. |
java.lang.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.
|
public static final java.lang.String OMERO_HOST
public static final java.lang.String OMERO_PORT
public static final int DEFAULT_PORT
public Server(java.lang.String serverHost)
DEFAULT_PORT
.serverHost
- Not null.public Server(java.lang.String serverHost, int port)
Server(String)
, serverHost may
not be null.serverHost
- Not null.port
- public java.util.Properties asProperties()
Properties
instance. Only those keys are present for which a field is non-null.public java.lang.String getHost()
public int getPort()