| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,SpawnerListener> |
listeners
Registered server listeners
|
private static SpawnerImpl |
spawner
Instance of Spawner
|
| Modifier | Constructor and Description |
|---|---|
private |
SpawnerImpl()
Register a Remote Object Server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.lang.String uuid,
SpawnerListener listener)
Add listener.
|
void |
clientIsReady(java.lang.String uuid,
java.lang.String data)
Notify when the client has started.
|
static SpawnerImpl |
getInstance()
Get the Spawner instance.
|
TemporaryClient |
getTemporaryClient(java.lang.String uuid,
java.lang.String projectToken)
Get a
TemporaryClient worker which will do the work after authenticating on the P2J
server using the temporary credentials. |
void |
releaseClient(java.lang.String uuid)
Releases the system resources for the spawned client given by its uuid.
|
void |
removeListener(java.lang.String uuid)
Remove listener.
|
private static final SpawnerImpl spawner
private java.util.Map<java.lang.String,SpawnerListener> listeners
public static SpawnerImpl getInstance()
public void clientIsReady(java.lang.String uuid,
java.lang.String data)
clientIsReady in interface Spawneruuid - Remote client assigned identifier.data - Custom data sent by the P2J client back to the server.public TemporaryClient getTemporaryClient(java.lang.String uuid, java.lang.String projectToken)
TemporaryClient worker which will do the work after authenticating on the P2J
server using the temporary credentials.getTemporaryClient in interface Spawneruuid - Remote client assigned identifier.projectToken - The project token to be set for the temporary session.public void addListener(java.lang.String uuid,
SpawnerListener listener)
uuid - Remote client assigned identifier.listener - Listener instance to add.public void removeListener(java.lang.String uuid)
uuid - Remote client assigned identifier.public void releaseClient(java.lang.String uuid)
releaseClient in interface Spawneruuid - Remote client assigned identifier.