public class GradleClient extends Object
This is used to send information from a one process to another process. This one is used by the launched process where the server (the process that launched us) is listening for our messages over a socket connection. The server typically sets the port to listen to via java system properties.
To use this, instantiate it, then call start passing in a protocol (which defines the actual communication messages).
| Constructor and Description |
|---|
GradleClient() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
sendMessage(String messageType,
String message) |
boolean |
sendMessage(String messageType,
String message,
Serializable data)
Call this to send a message and wait for the server to acknowledge siad message.
|
boolean |
start(ClientProcess.Protocol protocol)
Call this to start the client.
|
boolean |
start(ClientProcess.Protocol protocol,
int port)
Call this to start the client.
|
void |
stop()
Call this to stop communications with the server.
|
public boolean start(ClientProcess.Protocol protocol)
protocol - the protocol to use to communicate with the server.public boolean start(ClientProcess.Protocol protocol, int port)
protocol - the protocol to use to communicate with the server.port - the port the server is listening onpublic boolean sendMessage(String messageType, String message, Serializable data)
public void stop()
Copyright © 2013. All rights reserved