public class Request extends java.lang.Object implements Sendable
JSON.Parser| Constructor and Description |
|---|
Request(double time,
Endpoint destination) |
Request(java.lang.String... data)
Expecting at least 2 args.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fromJSON(java.lang.Object doc)
Convert String into JSON
|
Payload |
getData() |
Endpoint |
getDestination() |
double |
getTime() |
java.lang.String |
getType() |
void |
setData(Payload data) |
void |
setTime(double time) |
void |
setType(java.lang.String type) |
JSONDocument |
toJSON()
Convert class into json
|
public Request(java.lang.String... data)
throws EndpointException
data - is an array where data[0] time, data[1] endpoint, data[2] is not explicitly
required but the endpoint might require it.EndpointException - when an endpoint is not foundpublic Request(double time,
Endpoint destination)
public void setData(Payload data)
public double getTime()
public Payload getData()
public Endpoint getDestination()
public void setTime(double time)
public JSONDocument toJSON()
JSON