@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { installOutboundSocketBindingService(context, model); }
@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { installOutboundSocketBindingService(context, model); }
@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> serviceControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String outboundSocketName = address.getLastElement().getValue(); final ServiceController<OutboundSocketBinding> outboundSocketBindingServiceController; try { outboundSocketBindingServiceController = installOutboundSocketBindingService(context, model, outboundSocketName); } catch (UnknownHostException e) { throw new RuntimeException(e); } serviceControllers.add(outboundSocketBindingServiceController); }
private void handleBindingReinstall(OperationContext context, ModelNode bindingModel, ServiceName serviceName) throws OperationFailedException { context.removeService(serviceName); if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel); } }
@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> serviceControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String outboundSocketName = address.getLastElement().getValue(); final ServiceController<OutboundSocketBinding> outboundSocketBindingServiceController; try { outboundSocketBindingServiceController = installOutboundSocketBindingService(context, model, outboundSocketName); } catch (UnknownHostException e) { throw new RuntimeException(e); } serviceControllers.add(outboundSocketBindingServiceController); }
private void handleBindingReinstall(OperationContext context, ModelNode bindingModel, ServiceName serviceName) throws OperationFailedException { context.removeService(serviceName); if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel) throws OperationFailedException { context.removeService(OutboundSocketBinding.OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME.append(bindingName)); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel, bindingName); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel, bindingName); } } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage())); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel) throws OperationFailedException { context.removeService(OutboundSocketBinding.OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME.append(bindingName)); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel, bindingName); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, bindingModel, bindingName); } } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage())); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { context.removeService(OutboundSocketBinding.OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME.append(bindingName)); final ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig, bindingName); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig, bindingName); } } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { context.removeService(OutboundSocketBinding.OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME.append(bindingName)); final ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig, bindingName); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig, bindingName); } } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { final ServiceName serviceName = OUTBOUND_SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(bindingName, OutboundSocketBinding.class); context.removeService(serviceName); final ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig); } } catch (OperationFailedException e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { final ServiceName serviceName = OUTBOUND_SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(bindingName, OutboundSocketBinding.class); context.removeService(serviceName); final ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { if (remoteDestination) { RemoteDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig); } else { LocalDestinationOutboundSocketBindingAddHandler.installOutboundSocketBindingService(context, unresolvedConfig); } } catch (OperationFailedException e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }