JavaClientService
in package
implements
IJavaClientService
Class JavaClientService
Table of Contents
Interfaces
Properties
- $connection : Client
- $host : string
- $path : string
- $port : int
- $serializer : Serializer
Methods
- __construct() : mixed
- JavaClientService constructor.
- connect() : IJavaClientService
- getResponse() : IJavaClientEntity
- This method call Java side for get status of the processes
- sendRequest() : bool
- Send HTTP request to specify host, port and path.
- getUri() : string|null
- This method generate the uri from existing data. Before call this, call the connect method.
Properties
$connection
private
Client
$connection
$host
private
string
$host
$path
private
string
$path
$port
private
int
$port
$serializer
private
Serializer
$serializer
Methods
__construct()
JavaClientService constructor.
public
__construct(Serializer $serializer) : mixed
Parameters
- $serializer : Serializer
connect()
public
connect(string $host, int $port, string $path) : IJavaClientService
Parameters
- $host : string
-
Host with protocol. eg.: http://localohost
- $port : int
- $path : string
Return values
IJavaClientServicegetResponse()
This method call Java side for get status of the processes
public
getResponse(IJavaClientEntity $entity) : IJavaClientEntity
Parameters
- $entity : IJavaClientEntity
Return values
IJavaClientEntitysendRequest()
Send HTTP request to specify host, port and path.
public
sendRequest(IJavaClientEntity $entity, bool $async) : bool
Parameters
- $entity : IJavaClientEntity
- $async : bool
Return values
bool —This indicates the request is successful or not
getUri()
This method generate the uri from existing data. Before call this, call the connect method.
private
getUri() : string|null