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.ObjectEnclosed 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 booleanequals(java.lang.Object o)MessagegetMessage()The message sent or received.java.lang.StringgetMethod()The name of the method called.intgetSequence()The sequence number of the call.PServiceCallTypegetType()The type of service call.inthashCode()java.lang.StringtoString()
-
-
-
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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-