public interface Provider
Modifier and Type | Method and Description |
---|---|
OSService |
getOwner()
Returns the service that owns this provider (a provider can be owned by
one service only);
|
void |
populateResponse(org.processmining.framework.util.socket.ServiceEnvironment environment,
Request request,
ProviderResponse response)
This is the main request method, which can be used to retrieve
recommendations for specific queries.
|
OSService getOwner()
void populateResponse(org.processmining.framework.util.socket.ServiceEnvironment environment, Request request, ProviderResponse response)
This is the main request method, which can be used to retrieve recommendations for specific queries. All communication and encoding of parameters can be assumed to be performed in subclasses implementing this interface.
Note: This method may block for an unspecified time, including
network transport and resolving the request on the provider side. Use
this method in a separate thread if you wish your application to remain
responsive.
Also note that the request can fail, both due to transmission errors
(which will yield an IOException
, and due to the provider's
inability to resolve the request (i.e., an error occurred while handling
the issued request, signaled by an ordinary Exception
being
thrown; or, the request did not yield any usable result, which results in
a null
response value.
environment
- The context which is monitoring the servicerequest
- The request for recommendations.java.lang.Exception
- Signals an error in the recommendation provider
implementation.java.io.IOException
- Signals an error due to network transport problems.