public interface ExternalResource extends RemoteConnectable
An external resource features a lifecycle as shown in the following
image:
ImplementationPlatform| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates this resource, when it is retrieved from the pool.
|
void |
close()
Closes and releases the acquired resources.
|
java.lang.String |
getType()
Retrieves a unique identifier for this external resource.
|
boolean |
isBusy()
Checks if this device is busy.
|
void |
open()
Initializes and and acquires the needed resources.
|
void |
passivate()
Passivates this resource, when it is returned to the pool.
|
connect, disconnectjava.lang.String getType()
void open() throws NoresourceError
NoresourceError - The resource could not be opened.void activate()
throws NoresourceError
NoresourceError - The resource could not be activated.void passivate()
throws NoresourceError
The external resource is requested to return all resources that were assigned while it was active.
NoresourceError - The resource could not be opened.void close()
boolean isBusy()
A device can be busy only if it is activated. Closed or passivated
devices must return false.
true if the device is busy.