Package omero.gateway
Class ServerInformation
- java.lang.Object
-
- omero.gateway.ServerInformation
-
public class ServerInformation extends java.lang.Object
Holds the network connection information of an OMERO server- Since:
- 5.1
-
-
Constructor Summary
Constructors Constructor Description ServerInformation()
Creates an empty instanceServerInformation(java.lang.String hostname)
Creates a new instanceServerInformation(java.lang.String hostname, int port)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getHost()
Get the host information as required by the omero.client.java.lang.String
getHostname()
Return the hostname.int
getPort()
Return the portjava.lang.String
getProtocol()
Returns the protocol (lower case) if a websocket URL was specified (empty String otherwise).boolean
isURL()
Returnstrue
if a websocket URL was specified.void
setHost(java.lang.String host)
Set the hostname or websocket URLvoid
setHostname(java.lang.String hostname)
Deprecated.Renamed tosetHost(String)
Set the hostname or websocket URLvoid
setPort(int port)
Set the portjava.lang.String
toString()
-
-
-
Constructor Detail
-
ServerInformation
public ServerInformation()
Creates an empty instance
-
ServerInformation
public ServerInformation(java.lang.String hostname)
Creates a new instance- Parameters:
hostname
- The hostname or websocket URL
-
ServerInformation
public ServerInformation(java.lang.String hostname, int port)
Creates a new instance- Parameters:
hostname
- The hostname or websocket URLport
- The port
-
-
Method Detail
-
getHost
public java.lang.String getHost()
Get the host information as required by the omero.client. In case a websocket URL was specified the full URL will be returned. If only a host name was specified only the host name will be returned.- Returns:
- See above.
-
setHost
public void setHost(java.lang.String host)
Set the hostname or websocket URL- Parameters:
host
- See above
-
getHostname
public java.lang.String getHostname()
Return the hostname. Even if a websocket URL was specified only the hostname part will be returned by this method. UsegetHost()
to get the full websocket URL.- Returns:
- The hostname
-
setHostname
@Deprecated public void setHostname(java.lang.String hostname)
Deprecated.Renamed tosetHost(String)
Set the hostname or websocket URL- Parameters:
hostname
- See above
-
getPort
public int getPort()
Return the port- Returns:
- The port
-
setPort
public void setPort(int port)
Set the port- Parameters:
port
- See above
-
isURL
public boolean isURL()
Returnstrue
if a websocket URL was specified.- Returns:
- See above.
-
getProtocol
public java.lang.String getProtocol()
Returns the protocol (lower case) if a websocket URL was specified (empty String otherwise).- Returns:
- See above.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-