public interface SpawnerListener<R extends java.io.Serializable>
Modifier and Type | Method and Description |
---|---|
R |
allocateClient()
Allocates the system resources for the spawned client if it is necessarily.
|
void |
clientIsReady(java.lang.Object data)
Notify when the client has started.
|
java.lang.Object |
getServerData()
Depending on the implementation, receive custom data from the server.
|
TemporaryClient |
getTemporaryClient()
Get a
TemporaryClient worker which will do the work after authenticating on the P2J
server using the temporary credentials. |
void |
releaseClient()
Releases the system resources for this spawned client.
|
void clientIsReady(java.lang.Object data)
data
- Custom data sent by the P2J client back to the server.java.lang.Object getServerData()
TemporaryClient getTemporaryClient()
TemporaryClient
worker which will do the work after authenticating on the P2J
server using the temporary credentials.R allocateClient() throws Spawner.OutOfResources
Spawner.OutOfResources
- If the required resources can't be allocated.void releaseClient()