Package net.morimekta.providence
Interface PProcessor
-
- All Superinterfaces:
PServiceCallHandler
public interface PProcessor extends PServiceCallHandler
Service processor is an extension to the service call handler that can provide it's own service definition. This is the base interface for the handlers on the server side processing of a providence call.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PService
getDescriptor()
Get the descriptor for the given service.default <Request extends PMessage<Request>,Response extends PMessage<Response>>
PServiceCall<Response>handleCall(PServiceCall<Request> call)
Handle a service call.-
Methods inherited from interface net.morimekta.providence.PServiceCallHandler
handleCall
-
-
-
-
Method Detail
-
getDescriptor
@Nonnull PService getDescriptor()
Get the descriptor for the given service.- Returns:
- The service descriptor.
-
handleCall
default <Request extends PMessage<Request>,Response extends PMessage<Response>> PServiceCall<Response> handleCall(PServiceCall<Request> call) throws java.io.IOException
Handle a service call.- Type Parameters:
Request
- Request type.Response
- Response type.- Parameters:
call
- The request call.- Returns:
- The response service call object, or null if none (e.g. oneway).
- Throws:
java.io.IOException
- On read or write failure.SerializerException
- On serialization problems.
-
-