java.lang.Object
org.newsclub.net.unix.rmi.RemotePeerInfo
Information about the remote connection.
- Author:
- Christian Kohlschütter
-
Method Summary
Modifier and TypeMethodDescriptionstatic RemotePeerInfo
getConnectionInfo
(Remote obj) Returns the connection information (RMISocketFactory
, hostname and port) used for the givenRemote
object, ornull
if no customRMISocketFactory
was specified.getHost()
The hostname.The remote socket credentials, ornull
if they could not be retrieved.int
getPort()
The port.The socket factory used to establish connections.static AFUNIXSocketCredentials
Returns theAFUNIXSocketCredentials
for the currently active remote session (RemoteServer session during a remote method invocation), ornull
if it was not possible to retrieve these credentials.static AFUNIXSocketCredentials
Returns theAFUNIXSocketCredentials
for the peer (server) of the givenRemote
instance, ornull
if it was not possible to retrieve these credentials.toString()
-
Method Details
-
getSocketFactory
The socket factory used to establish connections.- Returns:
- The socket factory.
-
getHost
-
getPort
public int getPort()The port.- Returns:
- The port
-
getPeerCredentials
The remote socket credentials, ornull
if they could not be retrieved.- Returns:
- The peer credentials, or
null
.
-
remotePeerCredentials
Returns theAFUNIXSocketCredentials
for the currently active remote session (RemoteServer session during a remote method invocation), ornull
if it was not possible to retrieve these credentials.- Returns:
- The credentials, or
null
if unable to retrieve.
-
remotePeerCredentials
Returns theAFUNIXSocketCredentials
for the peer (server) of the givenRemote
instance, ornull
if it was not possible to retrieve these credentials.- Parameters:
obj
- The remote object.- Returns:
- The credentials, or
null
if unable to retrieve. - Throws:
IOException
- if an exception occurs.
-
getConnectionInfo
Returns the connection information (RMISocketFactory
, hostname and port) used for the givenRemote
object, ornull
if no customRMISocketFactory
was specified. AnIOException
may be thrown if we couldn't determine the socket factory.- Parameters:
obj
- The remote object.- Returns:
- The factory, or
null
- Throws:
IOException
- if the operation fails.
-
toString
-