Package omero.gateway

Class 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 instance
      ServerInformation​(java.lang.String hostname)
      Creates a new instance
      ServerInformation​(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 port
      java.lang.String getProtocol()
      Returns the protocol (lower case) if a websocket URL was specified (empty String otherwise).
      boolean isURL()
      Returns true if a websocket URL was specified.
      void setHost​(java.lang.String host)
      Set the hostname or websocket URL
      void setHostname​(java.lang.String hostname)
      Deprecated.
      Renamed to setHost(String) Set the hostname or websocket URL
      void setPort​(int port)
      Set the port
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 URL
        port - 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. Use getHost() to get the full websocket URL.
        Returns:
        The hostname
      • setHostname

        @Deprecated
        public void setHostname​(java.lang.String hostname)
        Deprecated.
        Renamed to setHost(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()
        Returns true 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 class java.lang.Object