clean some compilation warnings
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / impl / PceServiceRPCImpl.java
1 /*
2  * Copyright © 2017 AT&T, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.pce.impl;
9
10 import com.google.common.util.concurrent.ListenableFuture;
11 import org.opendaylight.transportpce.pce.service.PathComputationService;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveInput;
13 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.CancelResourceReserveOutput;
14 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestInput;
15 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PathComputationRequestOutput;
16 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.PceService;
17 /*
18 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.service.path.rpc.result.PathDescriptionBuilder;
19 ///// check well PathDescriptionBuilder import
20 //---------------------------------------------
21 */
22 import org.opendaylight.yangtools.yang.common.RpcResult;
23 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
26
27 /**
28  * PceService implementation.
29  */
30 public class PceServiceRPCImpl implements PceService {
31
32     private static final Logger LOG = LoggerFactory.getLogger(PceServiceRPCImpl.class);
33
34     private final PathComputationService pathComputationService;
35
36     public PceServiceRPCImpl(PathComputationService pathComputationService) {
37         this.pathComputationService = pathComputationService;
38     }
39
40     @Override
41     public ListenableFuture<RpcResult<CancelResourceReserveOutput>>
42             cancelResourceReserve(CancelResourceReserveInput input) {
43         LOG.info("RPC cancelResourceReserve request received");
44         return RpcResultBuilder.success(this.pathComputationService.cancelResourceReserve(input)).buildFuture();
45     }
46
47
48     @Override
49     public ListenableFuture<RpcResult<PathComputationRequestOutput>>
50             pathComputationRequest(PathComputationRequestInput input) {
51         LOG.info("RPC path computation request received");
52         return RpcResultBuilder.success(this.pathComputationService.pathComputationRequest(input)).buildFuture();
53     }
54
55 }