final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation);
return create(client, transformers, pathAddress, addressTranslator);
}
public static TransformingProxyController create(final TransactionalProtocolClient client, final Transformers transformers, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) {
final RemoteProxyController proxy = RemoteProxyController.create(client, pathAddress, addressTranslator);
final Transformers delegating = new Transformers() {
@Override
public TransformationTarget getTarget() {
return transformers.getTarget();
}
@Override
public OperationTransformer.TransformedOperation transformOperation(final TransformationContext context, final ModelNode original) throws OperationFailedException {
final ModelNode operation = proxy.translateOperationForProxy(original);
return transformers.transformOperation(context, operation);
}
@Override
public Resource transformResource(ResourceTransformationContext context, Resource resource) throws OperationFailedException {
return transformers.transformResource(context, resource);
}
@Override
public OperationTransformer.TransformedOperation transformOperation(OperationContext operationContext, ModelNode original) throws OperationFailedException {
final ModelNode operation = proxy.translateOperationForProxy(original);
return transformers.transformOperation(operationContext, operation);
}
@Override
public Resource transformRootResource(OperationContext operationContext, Resource resource) throws OperationFailedException {