@Immutable public class Method<RequestT,ResponseT> extends Object
Modifier and Type | Method and Description |
---|---|
static <RequestT,ResponseT> |
create(MethodType type,
String name,
Marshaller<RequestT> requestMarshaller,
Marshaller<ResponseT> responseMarshaller)
Constructor.
|
String |
getName()
The name of the method, not including the service name.
|
Marshaller<RequestT> |
getRequestMarshaller()
The marshaller used to serialize/deserialize the request.
|
Marshaller<ResponseT> |
getResponseMarshaller()
The marshaller used to serialize/deserialize the response.
|
MethodType |
getType()
The call type of the method.
|
public static <RequestT,ResponseT> Method<RequestT,ResponseT> create(MethodType type, String name, Marshaller<RequestT> requestMarshaller, Marshaller<ResponseT> responseMarshaller)
type
- the call type of the methodname
- the name of the method, not including the service namerequestMarshaller
- used to serialize/deserialize the requestresponseMarshaller
- used to serialize/deserialize the responsepublic MethodType getType()
public String getName()
public Marshaller<RequestT> getRequestMarshaller()
public Marshaller<ResponseT> getResponseMarshaller()