/** * Creates a new remote proxy controller using an existing channel. * * @param channelAssociation the channel association * @param pathAddress the address within the model of the created proxy controller * @param addressTranslator the translator to use translating the address for the remote proxy * @return the proxy controller */ public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); // the remote proxy return create(client, pathAddress, addressTranslator); }
public static TransformingProxyController create(final ManagementChannelHandler channelAssociation, final Transformers transformers, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); return create(client, transformers, pathAddress, addressTranslator); }
/** * Creates a {@link TransactionalProtocolClient} based on the given {@code channelAssociation} and then * uses that to create a {@link TransformingProxyController}. * * @param channelAssociation the channel handler. Cannot be {@code null} * @param transformers transformers to use for transforming resources and operations. Cannot be {@code null} * @param pathAddress address under which the proxy controller is registered in the resource tree * @param addressTranslator translator to use for converting local addresses to addresses appropriate for the target process * @return the proxy controller. Will not be {@code null} */ public static TransformingProxyController create(final ManagementChannelHandler channelAssociation, final Transformers transformers, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); return create(client, transformers, pathAddress, addressTranslator); }
public static TransformingProxyController create(final ManagementChannelHandler channelAssociation, final Transformers transformers, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator, final boolean validateAddresses) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); return create(client, transformers, pathAddress, addressTranslator, validateAddresses); }
/** * Creates a new remote proxy controller using an existing channel. * * @param channelAssociation the channel association * @param pathAddress the address within the model of the created proxy controller * @param addressTranslator the translator to use translating the address for the remote proxy * @return the proxy controller */ public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator, final boolean validateAddresses) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); // the remote proxy return create(client, pathAddress, addressTranslator, validateAddresses); }
/** * Creates a {@link TransactionalProtocolClient} based on the given {@code channelAssociation} and then * uses that to create a {@link TransformingProxyController}. * * @param channelAssociation the channel handler. Cannot be {@code null} * @param transformers transformers to use for transforming resources and operations. Cannot be {@code null} * @param pathAddress address under which the proxy controller is registered in the resource tree * @param addressTranslator translator to use for converting local addresses to addresses appropriate for the target process * @return the proxy controller. Will not be {@code null} */ public static TransformingProxyController create(final ManagementChannelHandler channelAssociation, final Transformers transformers, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); return create(client, transformers, pathAddress, addressTranslator); }
/** * Creates a new remote proxy controller using an existing channel. * * @param channelAssociation the channel association * @param pathAddress the address within the model of the created proxy controller * @param addressTranslator the translator to use translating the address for the remote proxy * @return the proxy controller * * @deprecated only present for test case use */ @Deprecated public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); // the remote proxy return create(client, pathAddress, addressTranslator, ModelVersion.CURRENT); }
/** * Creates a new remote proxy controller using an existing channel. * * @param channelAssociation the channel association * @param pathAddress the address within the model of the created proxy controller * @param addressTranslator the translator to use translating the address for the remote proxy * @return the proxy controller * * @deprecated only present for test case use */ @Deprecated public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) { final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation); // the remote proxy return create(client, pathAddress, addressTranslator, ModelVersion.CURRENT); }
protected synchronized TransactionalProtocolClient channelRegistered(final ManagementChannelHandler channelAssociation) { final InternalState current = this.internalState; // Create the remote controller client final TransactionalProtocolClient remoteClient = TransactionalProtocolHandlers.createClient(channelAssociation); // TODO better handling for server :reload operation (reset reloadRequired) if(current == InternalState.SERVER_STARTED && proxyController == null) { // Update the current remote connection protocolClient.connected(remoteClient); this.requiresReload = false; } else { internalSetState(new TransitionTask() { @Override public void execute(final ManagedServer server) throws Exception { // Update the current remote connection protocolClient.connected(remoteClient); } // TODO we just check that we are in the correct state, perhaps introduce a new state }, InternalState.SEND_STDIN, InternalState.SERVER_STARTING); } return remoteClient; }
private void setupHandler() { // Setup the transaction protocol handler handler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, handler, responseAttachmentSupport)); // Use the existing channel strategy masterProxy = ExistingChannelModelControllerClient.createAndAdd(handler); txMasterProxy = TransactionalProtocolHandlers.createClient(handler); }
private void setupHandler() { // Setup the transaction protocol handler handler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, handler, responseAttachmentSupport)); // Use the existing channel strategy masterProxy = ExistingChannelModelControllerClient.createAndAdd(handler); txMasterProxy = TransactionalProtocolHandlers.createClient(handler); }
synchronized TransactionalProtocolClient channelRegistered(final ManagementChannelHandler channelAssociation) { final InternalState current = this.internalState; // Create the remote controller client channelAssociation.getAttachments().attach(TransactionalProtocolClient.SEND_IDENTITY, Boolean.TRUE); channelAssociation.getAttachments().attach(TransactionalProtocolClient.SEND_IN_VM, Boolean.TRUE); final TransactionalProtocolClient remoteClient = TransactionalProtocolHandlers.createClient(channelAssociation); if (current == InternalState.RELOADING) { internalSetState(new TransitionTask() { @Override public boolean execute(ManagedServer server) throws Exception { // Update the current remote connection protocolClient.connected(remoteClient); // clear reload required state requiresReload = false; return true; } }, InternalState.RELOADING, InternalState.SERVER_STARTING); } else { internalSetState(new TransitionTask() { @Override public boolean execute(final ManagedServer server) throws Exception { // Update the current remote connection protocolClient.connected(remoteClient); return true; } // TODO we just check that we are in the correct state, perhaps introduce a new state }, InternalState.SEND_STDIN, InternalState.SERVER_STARTING); } return remoteClient; }
synchronized TransactionalProtocolClient channelRegistered(final ManagementChannelHandler channelAssociation) { final InternalState current = this.internalState; // Create the remote controller client channelAssociation.getAttachments().attach(TransactionalProtocolClient.SEND_IDENTITY, Boolean.TRUE); channelAssociation.getAttachments().attach(TransactionalProtocolClient.SEND_IN_VM, Boolean.TRUE); final TransactionalProtocolClient remoteClient = TransactionalProtocolHandlers.createClient(channelAssociation); if (current == InternalState.RELOADING) { internalSetState(new TransitionTask() { @Override public boolean execute(ManagedServer server) throws Exception { // Update the current remote connection protocolClient.connected(remoteClient); // clear reload required state requiresReload = false; return true; } }, InternalState.RELOADING, InternalState.SERVER_STARTING); } else { internalSetState(new TransitionTask() { @Override public boolean execute(final ManagedServer server) throws Exception { // Update the current remote connection protocolClient.connected(remoteClient); return true; } // TODO we just check that we are in the correct state, perhaps introduce a new state }, InternalState.SEND_STDIN, InternalState.SERVER_STARTING); } return remoteClient; }