Wrap service handlers to method handleServiceCall.
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / SalGroupServiceImpl.java
index 06903478c420a993e65554c3437173f0b390bc61..fd195735d75a940d7b31c1ffe9b92a2dc42a69bb 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.openflowplugin.impl.services;
 
+import com.google.common.base.Function;
+
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.GroupConvertor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupOutput;
@@ -28,8 +30,8 @@ public class SalGroupServiceImpl extends CommonService implements SalGroupServic
 
     @Override
     public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
-        return ServiceCallProcessingUtil.<AddGroupOutput>handleServiceCall(rpcContext, PRIMARY_CONNECTION,
-                provideWaitTime(), new Function<Void>() {
+        return this.<AddGroupOutput, Void> handleServiceCall( PRIMARY_CONNECTION,
+                 new Function<BigInteger,Future<RpcResult<Void>>>() {
 
                     @Override
                     public Future<RpcResult<Void>> apply(final BigInteger IDConnection) {
@@ -40,8 +42,8 @@ public class SalGroupServiceImpl extends CommonService implements SalGroupServic
 
     @Override
     public Future<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) {
-        return ServiceCallProcessingUtil.<UpdateGroupOutput>handleServiceCall(rpcContext, PRIMARY_CONNECTION,
-                provideWaitTime(), new Function<Void>() {
+        return this.<UpdateGroupOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+                new Function<BigInteger, Future<RpcResult<Void>>>() {
 
                     @Override
                     public Future<RpcResult<Void>> apply(final BigInteger IDConnection) {
@@ -52,8 +54,8 @@ public class SalGroupServiceImpl extends CommonService implements SalGroupServic
 
     @Override
     public Future<RpcResult<RemoveGroupOutput>> removeGroup(final RemoveGroupInput input) {
-        return ServiceCallProcessingUtil.<RemoveGroupOutput>handleServiceCall(rpcContext, PRIMARY_CONNECTION,
-                provideWaitTime(), new Function<Void>() {
+        return this.<RemoveGroupOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+                new Function<BigInteger, Future<RpcResult<Void>>>() {
 
                     @Override
                     public Future<RpcResult<Void>> apply(final BigInteger IDConnection) {