Interface InstanceConnectionService.InstanceConnection
- Enclosing interface:
InstanceConnectionService
public static interface InstanceConnectionService.InstanceConnection
Represents a connection to a remote instance.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Disconnects and disposes of the underlyingInstanceConnectionService.InstanceConnection
.Gets theInstanceId
represented by thisInstanceConnectionService.InstanceConnection
.Get theInstanceMetadataContext
associated with the remote instance.openRouteToNode
(NodeId nodeId) Opens a route to the supplied node withNodeId
, returning an address where it will be possible to connect using aRemoteInvoker
.
-
Method Details
-
getInstanceId
InstanceId getInstanceId()Gets theInstanceId
represented by thisInstanceConnectionService.InstanceConnection
. The value here is stored locally and does not require a connection to the network. Therefore it is still safe to call this method after the remote end disconnects.- Returns:
- the
InstanceId
for the connection
-
getInstanceMetadataContext
InstanceMetadataContext getInstanceMetadataContext()Get theInstanceMetadataContext
associated with the remote instance. This will be a remote proxy for the instance and will not be available after a call todisconnect()
is made.- Returns:
- the
InstanceMetadataContext
-
openRouteToNode
Opens a route to the supplied node withNodeId
, returning an address where it will be possible to connect using aRemoteInvoker
.- Parameters:
nodeId
-- Returns:
-
disconnect
void disconnect()Disconnects and disposes of the underlyingInstanceConnectionService.InstanceConnection
. Trying to use theInstanceMetadataContext
belonging to this connection will fail immediately.
-