1 /*
2 * Copyright 2010 James Pether Sörling
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * $Id$
17 * $HeadURL$
18 */
19 package com.hack23.cia.service.impl.action.common;
20
21 import com.hack23.cia.service.api.action.common.ServiceRequest;
22 import com.hack23.cia.service.api.action.common.ServiceResponse;
23
24 /**
25 * The Interface BusinessService.
26 *
27 * @param <T>
28 * the generic type
29 * @param <V>
30 * the value type
31 */
32 public interface BusinessService<T extends ServiceRequest,V extends ServiceResponse> {
33
34 /**
35 * Gets the supported service.
36 *
37 * @return the supported service
38 */
39 Class<? extends ServiceRequest> getSupportedService();
40
41 /**
42 * Process service.
43 *
44 * @param serviceRequest
45 * the service request
46 * @return the v
47 */
48 V processService(T serviceRequest);
49 }