Package net.morimekta.providence
Class PServiceCall<Message extends PMessage<Message>>
- java.lang.Object
-
- net.morimekta.providence.PServiceCall<Message>
-
public final class PServiceCall<Message extends PMessage<Message>> extends java.lang.Object
Enclosed call to a service method.
-
-
Constructor Summary
Constructors Constructor Description PServiceCall(java.lang.String method, PServiceCallType type, int sequence, Message message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Message
getMessage()
The message sent or received.java.lang.String
getMethod()
The name of the method called.int
getSequence()
The sequence number of the call.PServiceCallType
getType()
The type of service call.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PServiceCall
public PServiceCall(java.lang.String method, PServiceCallType type, int sequence, Message message)
-
-
Method Detail
-
getMethod
public java.lang.String getMethod()
The name of the method called.- Returns:
- Name of method.
-
getType
public PServiceCallType getType()
The type of service call.- Returns:
- Type of call.
-
getSequence
public int getSequence()
The sequence number of the call. Can be used to match responses with associated calls.- Returns:
- Sequence Number.
-
getMessage
public Message getMessage()
The message sent or received. This should map to the request or response message struct / union generated for the method being calles.- Returns:
- The sent message.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-