Interface InstanceConnectionService.InstanceConnection
- Enclosing interface:
InstanceConnectionService
public static interface InstanceConnectionService.InstanceConnection
Represents a connection to a remote instance.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDisconnects and disposes of the underlyingInstanceConnectionService.InstanceConnection.Gets theInstanceIdrepresented by thisInstanceConnectionService.InstanceConnection.Get theInstanceMetadataContextassociated 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 theInstanceIdrepresented 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
InstanceIdfor the connection
-
getInstanceMetadataContext
InstanceMetadataContext getInstanceMetadataContext()Get theInstanceMetadataContextassociated 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 theInstanceMetadataContextbelonging to this connection will fail immediately.
-