Package org.h2.util
Class NetworkConnectionInfo
java.lang.Object
org.h2.util.NetworkConnectionInfo
Network connection information.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNetworkConnectionInfo
(String server, byte[] clientAddr, int clientPort, String clientInfo) Creates new instance of network connection information.NetworkConnectionInfo
(String server, String clientAddr, int clientPort) Creates new instance of network connection information. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client address and port.byte[]
Returns the client address.Returns additional client information, ornull
.int
Returns the client port.Returns the protocol and port of the server.
-
Field Details
-
server
-
clientAddr
private final byte[] clientAddr -
clientPort
private final int clientPort -
clientInfo
-
-
Constructor Details
-
NetworkConnectionInfo
public NetworkConnectionInfo(String server, String clientAddr, int clientPort) throws UnknownHostException Creates new instance of network connection information.- Parameters:
server
- the protocol and port of the serverclientAddr
- the client addressclientPort
- the client port- Throws:
UnknownHostException
- if clientAddr cannot be resolved
-
NetworkConnectionInfo
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 Details
-
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
Returns additional client information, ornull
.- Returns:
- additional client information, or
null
-
getClient
Returns the client address and port.- Returns:
- the client address and port
-