A protocol consists of:
schemas;
schemas for exceptions;
| Modifier and Type | Class and Description |
|---|---|
| public class | Protocol.Message
A protocol message. |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private static final Set | |
| private byte[] | |
| private static final Set | |
| private final Map | |
| private String | |
| private String | |
| private static final Set | |
| public static final Schema | SYSTEM_ERROR
An error that can be thrown by any message. |
| public static final Schema | SYSTEM_ERRORS
Union type for generating system errors. |
| private Schema. | |
| public static final long | VERSION
The version of the protocol specification implemented here. |
| Access | Constructor and Description |
|---|---|
| private | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Protocol. | |
| public Protocol. | createMessage(Protocol.
Create a one-way message using the |
| public <T> Protocol. | createMessage(String name, String doc, JsonProperties propMap, Schema request)
Create a one-way message. |
| public <T> Protocol. | |
| public Protocol. | |
| public Protocol. | |
| public <T> Protocol. | createMessage(String name, String doc, JsonProperties propMap, Schema request, Schema response, Schema errors)
Create a two-way message. |
| public <T> Protocol. | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public String | |
| public byte[] | |
| public Map | |
| public String | |
| public String | |
| public Schema | |
| public Collection | |
| public int | |
| public static void | |
| public static Protocol | |
| public static Protocol | |
| public static Protocol | |
| public static Protocol | |
| private static Protocol | |
| private void | |
| private void | |
| private String | |
| private Protocol. | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | |
| pack-priv void | |
| public String | |
| public String |
| doc | back to summary |
|---|---|
| private String doc | |
| FIELD_RESERVED | back to summary |
|---|---|
| private static final Set<String> FIELD_RESERVED | |
| md5 | back to summary |
|---|---|
| private byte[] md5 | |
| MESSAGE_RESERVED | back to summary |
|---|---|
| private static final Set<String> MESSAGE_RESERVED | |
| messages | back to summary |
|---|---|
| private final Map<String, Protocol. | |
| name | back to summary |
|---|---|
| private String name | |
| namespace | back to summary |
|---|---|
| private String namespace | |
| PROTOCOL_RESERVED | back to summary |
|---|---|
| private static final Set<String> PROTOCOL_RESERVED | |
| SYSTEM_ERROR | back to summary |
|---|---|
| public static final Schema SYSTEM_ERROR An error that can be thrown by any message. | |
| SYSTEM_ERRORS | back to summary |
|---|---|
| public static final Schema SYSTEM_ERRORS Union type for generating system errors. | |
| types | back to summary |
|---|---|
| private Schema. | |
| VERSION | back to summary |
|---|---|
| public static final long VERSION The version of the protocol specification implemented here. | |
| Protocol | back to summary |
|---|---|
| private Protocol() | |
| Protocol | back to summary |
|---|---|
| public Protocol(Protocol p) Constructs a similar Protocol instance with the same | |
| Protocol | back to summary |
|---|---|
| public Protocol(String name, String doc, String namespace) | |
| Protocol | back to summary |
|---|---|
| public Protocol(String name, String namespace) | |
| createMessage | back to summary |
|---|---|
| public Protocol. Deprecated
Create a one-way message.
| |
| createMessage | back to summary |
|---|---|
| public Protocol. Create a one-way message using the | |
| createMessage | back to summary |
|---|---|
| public <T> Protocol. Create a one-way message. | |
| createMessage | back to summary |
|---|---|
| public <T> Protocol. Create a one-way message. | |
| createMessage | back to summary |
|---|---|
| public Protocol. Deprecated
Create a two-way message.
| |
| createMessage | back to summary |
|---|---|
| public Protocol. Create a two-way message using the | |
| createMessage | back to summary |
|---|---|
| public <T> Protocol. Create a two-way message. | |
| createMessage | back to summary |
|---|---|
| public <T> Protocol. Create a two-way message. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDoc | back to summary |
|---|---|
| public String getDoc() Doc string for this protocol. | |
| getMD5 | back to summary |
|---|---|
| public byte[] getMD5() Return the MD5 hash of the text of this protocol. | |
| getMessages | back to summary |
|---|---|
| public Map The messages of this protocol. | |
| getName | back to summary |
|---|---|
| public String getName() The name of this protocol. | |
| getNamespace | back to summary |
|---|---|
| public String getNamespace() The namespace of this protocol. Qualifies its name. | |
| getType | back to summary |
|---|---|
| public Schema getType(String name) Returns the named type. | |
| getTypes | back to summary |
|---|---|
| public Collection The types of this protocol. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) throws Exception | |
| parse | back to summary |
|---|---|
| public static Protocol parse(File file) throws IOException Read a protocol from a Json file. | |
| parse | back to summary |
|---|---|
| public static Protocol parse(InputStream stream) throws IOException Read a protocol from a Json stream. | |
| parse | back to summary |
|---|---|
| public static Protocol parse(String string, String... more) Read a protocol from one or more json strings | |
| parse | back to summary |
|---|---|
| public static Protocol parse(String string) Read a protocol from a Json string. | |
| parse | back to summary |
|---|---|
| private static Protocol parse(JsonParser parser) | |
| parse | back to summary |
|---|---|
| private void parse(JsonNode json) | |
| parseDoc | back to summary |
|---|---|
| private void parseDoc(JsonNode json) | |
| parseDocNode | back to summary |
|---|---|
| private String parseDocNode(JsonNode json) | |
| parseMessage | back to summary |
|---|---|
| private Protocol. | |
| parseMessages | back to summary |
|---|---|
| private void parseMessages(JsonNode json) | |
| parseNameAndNamespace | back to summary |
|---|---|
| private void parseNameAndNamespace(JsonNode json) | |
| parseProps | back to summary |
|---|---|
| private void parseProps(JsonNode json) | |
| parseTypes | back to summary |
|---|---|
| private void parseTypes(JsonNode json) | |
| setName | back to summary |
|---|---|
| private void setName(String name, String namespace) | |
| setTypes | back to summary |
|---|---|
| public void setTypes(Collection<Schema> newTypes) Set the types of this protocol. | |
| toJson | back to summary |
|---|---|
| pack-priv void toJson(JsonGenerator gen) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Render this as JSON.
| |
| toString | back to summary |
|---|---|
| public String toString(boolean pretty) Render this as JSON.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private Schema |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public String | |
| public Schema | |
| public String | |
| public Schema | |
| public Schema | |
| public int | |
| public boolean | |
| pack-priv void | |
| pack-priv void | |
| public String |
| doc | back to summary |
|---|---|
| private String doc | |
| name | back to summary |
|---|---|
| private String name | |
| request | back to summary |
|---|---|
| private Schema request | |
| Message | back to summary |
|---|---|
| private Message(String name, String doc, JsonProperties propMap, Schema request) Construct a message. | |
| Message | back to summary |
|---|---|
| private Message(String name, String doc, Map<String, ?> propMap, Schema request) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDoc | back to summary |
|---|---|
| public String getDoc() | |
| getErrors | back to summary |
|---|---|
| public Schema getErrors() Errors that might be thrown. | |
| getName | back to summary |
|---|---|
| public String getName() The name of this message. | |
| getRequest | back to summary |
|---|---|
| public Schema getRequest() The parameters of this message. | |
| getResponse | back to summary |
|---|---|
| public Schema getResponse() The returned data. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isOneWay | back to summary |
|---|---|
| public boolean isOneWay() Returns true if this is a one-way message, with no response or errors. | |
| toJson | back to summary |
|---|---|
| pack-priv void toJson(JsonGenerator gen) throws IOException | |
| toJson1 | back to summary |
|---|---|
| pack-priv void toJson1(JsonGenerator gen) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| private | |
| private | TwoWayMessage(String name, String doc, JsonProperties propMap, Schema request, Schema response, Schema errors)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides org. |
| public Schema | |
| public Schema | |
| public int | hashCode()
Overrides org. |
| public boolean | isOneWay()
Overrides org. |
| pack-priv void |
| errors | back to summary |
|---|---|
| private Schema errors | |
| response | back to summary |
|---|---|
| private Schema response | |
| TwoWayMessage | back to summary |
|---|---|
| private TwoWayMessage(String name, String doc, Map<String, ?> propMap, Schema request, Schema response, Schema errors) Construct a message. | |
| TwoWayMessage | back to summary |
|---|---|
| private TwoWayMessage(String name, String doc, JsonProperties propMap, Schema request, Schema response, Schema errors) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getErrors | back to summary |
|---|---|
| public Schema getErrors() Overrides org. Doc from org. Errors that might be thrown.
| |
| getResponse | back to summary |
|---|---|
| public Schema getResponse() Overrides org. Doc from org. The returned data.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isOneWay | back to summary |
|---|---|
| public boolean isOneWay() Overrides org. Doc from org. Returns true if this is a one-way message, with no response or errors.
| |
| toJson1 | back to summary |
|---|---|
| pack-priv void toJson1(JsonGenerator gen) throws IOException Overrides org.
| |