Package org.h2.util

Class NetworkConnectionInfo


  • public final class NetworkConnectionInfo
    extends java.lang.Object
    Network connection information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] clientAddr  
      private java.lang.String clientInfo  
      private int clientPort  
      private java.lang.String server  
    • Constructor Summary

      Constructors 
      Constructor Description
      NetworkConnectionInfo​(java.lang.String server, byte[] clientAddr, int clientPort, java.lang.String clientInfo)
      Creates new instance of network connection information.
      NetworkConnectionInfo​(java.lang.String server, java.lang.String clientAddr, int clientPort)
      Creates new instance of network connection information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getClient()
      Returns the client address and port.
      byte[] getClientAddr()
      Returns the client address.
      java.lang.String getClientInfo()
      Returns additional client information, or null.
      int getClientPort()
      Returns the client port.
      java.lang.String getServer()
      Returns the protocol and port of the server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • server

        private final java.lang.String server
      • clientAddr

        private final byte[] clientAddr
      • clientPort

        private final int clientPort
      • clientInfo

        private final java.lang.String clientInfo
    • Constructor Detail

      • NetworkConnectionInfo

        public NetworkConnectionInfo​(java.lang.String server,
                                     java.lang.String clientAddr,
                                     int clientPort)
                              throws java.net.UnknownHostException
        Creates new instance of network connection information.
        Parameters:
        server - the protocol and port of the server
        clientAddr - the client address
        clientPort - the client port
        Throws:
        java.net.UnknownHostException - if clientAddr cannot be resolved
      • NetworkConnectionInfo

        public NetworkConnectionInfo​(java.lang.String server,
                                     byte[] clientAddr,
                                     int clientPort,
                                     java.lang.String clientInfo)
        Creates new instance of network connection information.
        Parameters:
        server - the protocol and port of the server
        clientAddr - the client address
        clientPort - the client port
        clientInfo - additional client information, or null
    • Method Detail

      • getServer

        public java.lang.String getServer()
        Returns the protocol and port of the server.
        Returns:
        the protocol and port of the server
      • getClientAddr

        public byte[] getClientAddr()
        Returns the client address.
        Returns:
        the client address
      • getClientPort

        public int getClientPort()
        Returns the client port.
        Returns:
        the client port
      • getClientInfo

        public java.lang.String getClientInfo()
        Returns additional client information, or null.
        Returns:
        additional client information, or null
      • getClient

        public java.lang.String getClient()
        Returns the client address and port.
        Returns:
        the client address and port