Package org.n52.iceland.service.operator
Class GenericServiceOperator
- java.lang.Object
-
- org.n52.iceland.service.operator.GenericServiceOperator
-
- All Implemented Interfaces:
ServiceOperator,Component<OwsServiceKey>,Keyed<OwsServiceKey>
public class GenericServiceOperator extends Object implements ServiceOperator
Generic service operator implementation that just delegates to a matchingRequestOperator.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description GenericServiceOperator(String service, String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)OwsServiceKeygetKey()Gets theServiceOperatorKeyfor this service.Set<OwsServiceKey>getKeys()inthashCode()OwsServiceResponsereceiveRequest(OwsServiceRequest request)method handles the incoming operation request and returns a matching response or an ServiceExceptionReport if the service was not able to build a responsevoidsetRequestOperatorRepository(RequestOperatorRepository repo)Sets theRequestOperatorRepositoryto get matchingRequestOperators.StringtoString()
-
-
-
Method Detail
-
getKey
public OwsServiceKey getKey()
Gets theServiceOperatorKeyfor this service.- Returns:
- the key
-
setRequestOperatorRepository
@Inject public void setRequestOperatorRepository(RequestOperatorRepository repo)
Sets theRequestOperatorRepositoryto get matchingRequestOperators.- Parameters:
repo- the repository
-
getKeys
public Set<OwsServiceKey> getKeys()
- Specified by:
getKeysin interfaceKeyed<OwsServiceKey>
-
receiveRequest
public OwsServiceResponse receiveRequest(OwsServiceRequest request) throws OwsExceptionReport
method handles the incoming operation request and returns a matching response or an ServiceExceptionReport if the service was not able to build a response- Specified by:
receiveRequestin interfaceServiceOperator- Parameters:
request- the operation request- Returns:
- Returns the response of the request (e.g. CapabilitiesResponse
- Throws:
OperationNotSupportedException- if no matchingRequestOperatorcould be found or if the operator returned anull-response.OwsExceptionReport- If an error occurred or the requested operation is not supported
-
-