Class SimpleInstance
java.lang.Object
dev.getelements.elements.rt.remote.SimpleInstance
- All Implemented Interfaces:
Instance
,AutoCloseable
- Direct Known Subclasses:
SimpleWorkerInstance
-
Field Summary
FieldsFields inherited from interface dev.getelements.elements.rt.remote.Instance
EXECUTOR_SERVICE, SCHEDULED_EXECUTOR_SERVICE, THREAD_GROUP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Attempts to stop the instance.Gets this instancesInstanceId
protected void
protected void
protected void
protected void
void
Forces a refresh of the underlying connections as necessary.void
setAsyncConnectionService
(AsyncConnectionService<?, ?> asyncConnectionService) void
setInstanceConnectionService
(InstanceConnectionService instanceConnectionService) void
setInstanceDiscoveryService
(InstanceDiscoveryService instanceDiscoveryService) void
setInstanceId
(InstanceId instanceId) void
setRemoteInvokerRegistry
(RemoteInvokerRegistry remoteInvokerRegistry) void
start()
Attempts to start, throwing an instance ofMultiException
any failures happen during the startup process.
-
Field Details
-
instanceId
-
-
Constructor Details
-
SimpleInstance
public SimpleInstance()
-
-
Method Details
-
start
public void start()Description copied from interface:Instance
Attempts to start, throwing an instance ofMultiException
any failures happen during the startup process. A subsequent call toInstance.close()
should follow to ensure resources are cleaned up. -
preStart
-
postStart
-
close
public void close()Description copied from interface:Instance
Attempts to stop the instance.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceInstance
-
preClose
-
postClose
-
refreshConnections
public void refreshConnections()Description copied from interface:Instance
Forces a refresh of the underlying connections as necessary.- Specified by:
refreshConnections
in interfaceInstance
-
getInstanceId
Description copied from interface:Instance
Gets this instancesInstanceId
- Specified by:
getInstanceId
in interfaceInstance
- Returns:
- the
InstanceId
-
setInstanceId
-
getRemoteInvokerRegistry
-
setRemoteInvokerRegistry
-
getInstanceDiscoveryService
-
setInstanceDiscoveryService
-
getInstanceConnectionService
-
setInstanceConnectionService
@Inject public void setInstanceConnectionService(InstanceConnectionService instanceConnectionService) -
getAsyncConnectionService
-
setAsyncConnectionService
-