Class ServerRecord


  • public class ServerRecord
    extends java.lang.Object
    Represents the information needed to connect to a CM server
    • Method Detail

      • getHost

        public java.lang.String getHost()
      • getPort

        public int getPort()
      • getEndpoint

        public java.net.InetSocketAddress getEndpoint()
      • getProtocolTypes

        public java.util.EnumSet<ProtocolTypes> getProtocolTypes()
      • createServer

        public static ServerRecord createServer​(java.lang.String host,
                                                int port,
                                                java.util.EnumSet<ProtocolTypes> protocolTypes)
      • createSocketServer

        public static ServerRecord createSocketServer​(java.net.InetSocketAddress endpoint)
      • tryCreateSocketServer

        public static ServerRecord tryCreateSocketServer​(java.lang.String address)
        Creates a Socket server given an IP endpoint.
        Parameters:
        address - The IP address and port of the server, as a string.
        Returns:
        A new [ServerRecord], if the address was able to be parsed. **null** otherwise.
      • createWebSocketServer

        public static ServerRecord createWebSocketServer​(java.lang.String address)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object