public static final class RpcAdapter extends AbstractImplAdapter<Rpc> implements DOMRpcImplementation {
- RpcAdapter(BindingNormalizedNodeCodecRegistry codec, Class<? extends Operation> clazz,
- Rpc<?, ?> delegate) {
+ RpcAdapter(final BindingNormalizedNodeCodecRegistry codec, final Class<? extends Operation> clazz,
+ final Rpc<?, ?> delegate) {
super(codec, clazz, delegate);
}
- @SuppressWarnings("checkstyle:illegalCatch, unchecked")
+ @SuppressWarnings("unchecked")
@Nonnull
@Override
public FluentFuture<DOMRpcResult> invokeRpc(@Nonnull final DOMRpcIdentifier rpc,
final SettableFuture<RpcResult<?>> bindingResult = SettableFuture.create();
CompletableFuture.runAsync(() -> delegate.invoke((Input<?>) bindingInput,
new RpcCallback<Output<?>>() {
- public void onSuccess(Output<?> output) {
+ @Override
+ public void onSuccess(final Output<?> output) {
bindingResult.set(RpcResultBuilder.success(output).build());
}
- public void onFailure(Throwable error) {
+ @Override
+ public void onFailure(final Throwable error) {
bindingResult.set(RpcResultBuilder.failed().withError(ErrorType.APPLICATION,
error.getMessage(), error).build());
}
public static final class ActionAdapter extends AbstractImplAdapter<Action>
implements DOMActionImplementation {
- ActionAdapter(BindingNormalizedNodeCodecRegistry codec, Class<? extends Operation> clazz,
- Action<?, ?, ?, ?> delegate) {
+ ActionAdapter(final BindingNormalizedNodeCodecRegistry codec, final Class<? extends Operation> clazz,
+ final Action<?, ?, ?, ?> delegate) {
super(codec, clazz, delegate);
}
- @SuppressWarnings("checkstyle:illegalCatch, unchecked")
+ @Override
+ @SuppressWarnings("unchecked")
@Nonnull
- public FluentFuture<? extends DOMActionResult> invokeAction(SchemaPath type, DOMDataTreeIdentifier path,
- ContainerNode input) {
+ public FluentFuture<? extends DOMActionResult> invokeAction(final SchemaPath type,
+ final DOMDataTreeIdentifier path, final ContainerNode input) {
final TreeNode bindingInput = input != null ? deserialize(type, input) : null;
final SettableFuture<RpcResult<?>> bindingResult = SettableFuture.create();
CompletableFuture.runAsync(() -> delegate.invoke((Input<?>) bindingInput,
codec.fromYangInstanceIdentifier(path.getRootIdentifier()),
new RpcCallback<Output<?>>() {
- public void onSuccess(Output<?> output) {
+ @Override
+ public void onSuccess(final Output<?> output) {
bindingResult.set(RpcResultBuilder.success(output).build());
}
- public void onFailure(Throwable error) {
+ @Override
+ public void onFailure(final Throwable error) {
bindingResult.set(RpcResultBuilder.failed().withError(ErrorType.APPLICATION,
error.getMessage(), error).build());
}