Add AbstractMessageService
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / AbstractService.java
index 73f098da9eb4241931cae4fc64709f503a85e0cc..0da48399a21fabf4beebeb7d59782ee1cf964211 100644 (file)
@@ -34,8 +34,6 @@ import org.slf4j.LoggerFactory;
 
 abstract class AbstractService<I, O> {
     private static final Logger LOG = LoggerFactory.getLogger(AbstractService.class);
-    private static final long WAIT_TIME = 2000;
-    private static final BigInteger PRIMARY_CONNECTION = BigInteger.ZERO;
 
     private final short version;
     private final BigInteger datapathId;
@@ -89,11 +87,11 @@ abstract class AbstractService<I, O> {
         return messageSpy;
     }
 
-    protected abstract OfHeader buildRequest(Xid xid, I input) throws Exception;
+    protected abstract OfHeader buildRequest(Xid xid, I input) throws ServiceException;
 
     protected abstract FutureCallback<OfHeader> createCallback(RequestContext<O> context, Class<?> requestType);
 
-    public final ListenableFuture<RpcResult<O>> handleServiceCall(@Nonnull final I input) {
+    public ListenableFuture<RpcResult<O>> handleServiceCall(@Nonnull final I input) {
         Preconditions.checkNotNull(input);
 
         final Class<?> requestType;