Package org.h2.util
Class NetworkConnectionInfo
- java.lang.Object
-
- org.h2.util.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, ornull
.int
getClientPort()
Returns the client port.java.lang.String
getServer()
Returns the protocol and port of the server.
-
-
-
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 serverclientAddr
- the client addressclientPort
- 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 serverclientAddr
- the client addressclientPort
- the client portclientInfo
- additional client information, ornull
-
-
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, ornull
.- Returns:
- additional client information, or
null
-
getClient
public java.lang.String getClient()
Returns the client address and port.- Returns:
- the client address and port
-
-