java.lang.Object
org.newsclub.net.unix.rmi.RemotePeerInfo
Information about the remote connection.
- Author:
- Christian Kohlschütter
-
Method Summary
Modifier and TypeMethodDescriptionstatic RemotePeerInfogetConnectionInfo(Remote obj) Returns the connection information (RMISocketFactory, hostname and port) used for the givenRemoteobject, ornullif no customRMISocketFactorywas specified.getHost()The hostname.The remote socket credentials, ornullif they could not be retrieved.intgetPort()The port.The socket factory used to establish connections.static AFUNIXSocketCredentialsReturns theAFUNIXSocketCredentialsfor the currently active remote session (RemoteServer session during a remote method invocation), ornullif it was not possible to retrieve these credentials.static AFUNIXSocketCredentialsReturns theAFUNIXSocketCredentialsfor the peer (server) of the givenRemoteinstance, ornullif 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, ornullif they could not be retrieved.- Returns:
- The peer credentials, or
null.
-
remotePeerCredentials
Returns theAFUNIXSocketCredentialsfor the currently active remote session (RemoteServer session during a remote method invocation), ornullif it was not possible to retrieve these credentials.- Returns:
- The credentials, or
nullif unable to retrieve.
-
remotePeerCredentials
Returns theAFUNIXSocketCredentialsfor the peer (server) of the givenRemoteinstance, ornullif it was not possible to retrieve these credentials.- Parameters:
obj- The remote object.- Returns:
- The credentials, or
nullif unable to retrieve. - Throws:
IOException- if an exception occurs.
-
getConnectionInfo
Returns the connection information (RMISocketFactory, hostname and port) used for the givenRemoteobject, ornullif no customRMISocketFactorywas specified. AnIOExceptionmay 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
-