static ModelNode getResponse(final String outcome) { return getFailureResponse(outcome, null); }
@Override public void cancelled() { operationFailed(getResponse(CANCELLED)); }
/** * Create a transactional protocol client. * * @param channelAssociation the channel handler * @return the transactional protocol client */ public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation); channelAssociation.addHandlerFactory(client); return client; }
@Override public AsyncFuture<OperationResponse> execute(TransactionalOperationListener<Operation> listener, ModelNode operation, OperationMessageHandler messageHandler, OperationAttachments attachments) throws IOException { final Operation wrapper = TransactionalProtocolHandlers.wrap(operation, messageHandler, attachments); return execute(listener, wrapper); }
@Override protected void sendRequest(final ActiveOperation.ResultHandler<ModelNode> resultHandler, final ManagementRequestContext<ExecuteRequestContext> context, final FlushableDataOutput output) throws IOException { // Write the operation final ExecuteRequestContext executionContext = context.getAttachment(); final List<InputStream> streams = executionContext.getInputStreams(); final ModelNode operation = executionContext.getOperation(); int inputStreamLength = 0; if (streams != null) { inputStreamLength = streams.size(); } output.write(ModelControllerProtocol.PARAM_OPERATION); operation.writeExternal(output); output.write(ModelControllerProtocol.PARAM_INPUTSTREAMS_LENGTH); output.writeInt(inputStreamLength); final Boolean sendSubject = channelAssociation.getAttachments().getAttachment(SEND_SUBJECT); if (sendSubject != null && sendSubject) { final Subject subject = context.getAttachment().getSerializableSubject(); writeSubject(output, subject); } }
@Override public void cancelled() { operationFailed(getResponse(CANCELLED)); }
/** * Create a transactional protocol client. * * @param channelAssociation the channel handler * @return the transactional protocol client */ public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation); channelAssociation.addHandlerFactory(client); return client; }
@Override public AsyncFuture<OperationResponse> execute(TransactionalOperationListener<Operation> listener, ModelNode operation, OperationMessageHandler messageHandler, OperationAttachments attachments) throws IOException { final Operation wrapper = TransactionalProtocolHandlers.wrap(operation, messageHandler, attachments); return execute(listener, wrapper); }
static ModelNode getResponse(final String outcome) { return getFailureResponse(outcome, null); }
@Override public void cancelled() { operationFailed(getResponse(CANCELLED)); }
/** * Create a transactional protocol client. * * @param channelAssociation the channel handler * @return the transactional protocol client */ public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation); channelAssociation.addHandlerFactory(client); return client; }
@Override public AsyncFuture<ModelNode> execute(TransactionalOperationListener<Operation> listener, ModelNode operation, OperationMessageHandler messageHandler, OperationAttachments attachments) throws IOException { final Operation wrapper = TransactionalProtocolHandlers.wrap(operation, messageHandler, attachments); return execute(listener, wrapper); }
static ModelNode getResponse(final String outcome) { return getFailureResponse(outcome, null); }
@Override public void cancelled() { operationFailed(getResponse(CANCELLED)); }
/** * Create a transactional protocol client. * * @param channelAssociation the channel handler * @return the transactional protocol client */ public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) { final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation); channelAssociation.addHandlerFactory(client); return client; }
@Override public AsyncFuture<ModelNode> execute(TransactionalOperationListener<Operation> listener, ModelNode operation, OperationMessageHandler messageHandler, OperationAttachments attachments) throws IOException { final Operation wrapper = TransactionalProtocolHandlers.wrap(operation, messageHandler, attachments); return execute(listener, wrapper); }
static ModelNode getResponse(final String outcome) { return getFailureResponse(outcome, null); }
@Override public void failed(Exception e) { operationFailed(getFailureResponse(FAILED, e.getMessage())); }
@Override public void failed(Exception e) { operationFailed(getFailureResponse(FAILED, e.getMessage())); }
@Override public void failed(Exception e) { operationFailed(getFailureResponse(FAILED, e.getMessage())); }