X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-client-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Frestconf%2Fclient%2FBindingToRestRpc.java;h=40d29da662a56e725d8ad0af79a409ee1a07e6d5;hb=85c0405ed187f2d00d47c12c20f3c5ab8029cd2f;hp=fe4eb76695e25b08007f27215ce3cd26bc1d7e7a;hpb=816f99c957bbef1f0352b2de0ad4ec629232e7bf;p=yangtools.git diff --git a/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java b/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java index fe4eb76695..40d29da662 100644 --- a/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java +++ b/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java @@ -48,7 +48,7 @@ public class BindingToRestRpc implements InvocationHandler { private final SchemaContext schcemaContext; private final Module module; - public BindingToRestRpc(Class proxiedInterface,BindingIndependentMappingService mappingService,RestconfClientImpl client,SchemaContext schemaContext) throws Exception { + public BindingToRestRpc(final Class proxiedInterface,final BindingIndependentMappingService mappingService,final RestconfClientImpl client,final SchemaContext schemaContext) throws Exception { this.mappingService = mappingService; this.client = client; this.schcemaContext = schemaContext; @@ -57,7 +57,7 @@ public class BindingToRestRpc implements InvocationHandler { } @Override - public Object invoke(Object o,final Method method, Object[] objects) throws Throwable { + public Object invoke(final Object o,final Method method, final Object[] objects) throws Exception { for (RpcDefinition rpcDef:module.getRpcs()){ if (method.getName().equals(BindingMapping.getMethodName(rpcDef.getQName()))){ @@ -77,7 +77,7 @@ public class BindingToRestRpc implements InvocationHandler { final DataSchemaNode rpcOutputSchema = rpcDef.getOutput(); return client.post(ResourceUri.OPERATIONS.getPath() + "/" + moduleName + ":" + rpcMethodName,payloadString,new Function() { @Override - public Object apply(ClientResponse clientResponse) { + public Object apply(final ClientResponse clientResponse) { if (clientResponse.getStatus() != 200) { throw new IllegalStateException("Can't get data from restconf. "+clientResponse.getClientResponseStatus()); } @@ -101,10 +101,10 @@ public class BindingToRestRpc implements InvocationHandler { throw new IllegalStateException("Unexpected state of proxy method."); } - public static T getProxy(Class proxiedInterface, - BindingIndependentMappingService mappingService, - RestconfClientImpl restconfClient, - SchemaContext schemaContext) { + public static T getProxy(final Class proxiedInterface, + final BindingIndependentMappingService mappingService, + final RestconfClientImpl restconfClient, + final SchemaContext schemaContext) { T proxiedType = null; try { proxiedType = (T) Proxy.newProxyInstance