private static class WebClientSpawner.TemporaryClientTask extends java.lang.Object implements TemporaryClient
This will create a ChuiWebDriver
or GuiWebDriver
and start the
embedded web server which will serve this client's requests.
Modifier and Type | Field and Description |
---|---|
private boolean |
gui
Flag that denotes client type.
|
private java.lang.String[] |
proxyServerParameters |
Constructor and Description |
---|
TemporaryClientTask(boolean gui,
java.lang.String[] requestParameters)
Create a new web client spawner.
|
Modifier and Type | Method and Description |
---|---|
ScreenDriver |
doWork(Spawner spawner,
java.lang.String uuid,
BootstrapConfig config)
On P2J client side, it will do custom work after authenticating using the temporary
credentials.
|
private java.lang.String |
rewriteUri(WebClientConfig webClient)
Rewrite uri in the case if a web client is accessed via the reverse proxy server.
|
private boolean gui
private java.lang.String[] proxyServerParameters
public TemporaryClientTask(boolean gui, java.lang.String[] requestParameters)
gui
- Flag that denotes client type (true
for GUI, false
for ChUI).requestParameters
- Holds additional parameters if they are provided. It is expected that the first
requestParameters[0] holds the forwarded host of "X-Forwarded-Host" HTTP header
and requestParameters[1] holds the corresponding forwarded protocol that is
provided by "X-Forwarded-Proto" value, and requestParameters[2] holds
the client IP address.public ScreenDriver doWork(Spawner spawner, java.lang.String uuid, BootstrapConfig config)
This will create a ChuiWebDriver
or GuiWebDriver
and start the
embedded web server which will serve this client's requests.
doWork
in interface TemporaryClient
spawner
- The spawner remote access interface.uuid
- Remote client identifier uuid.config
- The configuration to use for setup of the client and for the server connection.java.lang.RuntimeException
- If the embedded web server could not be started.private java.lang.String rewriteUri(WebClientConfig webClient)
webClient
- The web client system resources