/** * Create a client instance for a remote address and port. * * @param address the address of the remote host * @param port the port * @return A model controller client */ public static ModelControllerClient create(final InetAddress address, final int port) { return create(new ModelControllerClientConfiguration.Builder() .setHostName(address.getHostAddress()) .setPort(port) .build()); }
/** * Create an {@link ServerDeploymentManager} instance for a remote address and port. * * This creates a {@code ModelControllerClient} which has to be closed using the * {@link org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager#close()} method. * * @param protocol The protocol to use * @param address The remote address to connect to * @param port The remote port * @return A domain client */ public static ServerDeploymentManager create(final String protocol, final InetAddress address, int port) { return create(ModelControllerClient.Factory.create(protocol, address, port), true); }
public DomainClientImpl(InetAddress address, int port, CallbackHandler handler) { this.delegate = ModelControllerClient.Factory.create(address, port, handler); }
public DomainClientImpl(InetAddress address, int port, CallbackHandler handler) { this.delegate = ModelControllerClient.Factory.create(address, port, handler); }
/** * Create an {@link ServerDeploymentManager} instance for a remote address and port. * * This creates a {@code ModelControllerClient} which has to be closed using the * {@link org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager#close()} method. * * @param protocol The protocol to use * @param address The remote address to connect to * @param port The remote port * @return A domain client */ public static ServerDeploymentManager create(final String protocol, final InetAddress address, int port) { return create(ModelControllerClient.Factory.create(protocol, address, port), true); }
public DomainClientImpl(InetAddress address, int port) { this.delegate = ModelControllerClient.Factory.create(address, port); }
@Override protected void init() throws IOException { client = ModelControllerClient.Factory.create(serverConfig.getConnectionInfo().getHostAddress(), serverConfig.getConnectionInfo().getPort(), serverConfig.getConnectionInfo().getCallbackHandler()); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is http-remoting or https-remoting http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param saslOptions Additional options to be passed to the SASL mechanism. * @return A model controller client * @throws UnknownHostException if the host cannot be found */ public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final Map<String, String> saslOptions) throws UnknownHostException { return create(ClientConfigurationImpl.create(protocol, hostName, port, handler, saslOptions)); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is http-remoting or https-remoting http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @return A model controller client * @throws UnknownHostException if the host cannot be found */ public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return create(ClientConfigurationImpl.create(protocol, hostName, port, handler, sslContext, connectionTimeout)); }
public DomainClientImpl(String protocol, InetAddress address, int port, CallbackHandler handler) { this.delegate = ModelControllerClient.Factory.create(protocol, address, port, handler); } public DomainClientImpl(ModelControllerClient delegate) {
@Test public void testCurrentHttp() throws Exception { test(ModelControllerClient.Factory.create(CONTROLLER_ADDRESS, 9990)); }
/** * Create an {@link ServerDeploymentManager} instance for a remote address and port. * * This creates a {@code ModelControllerClient} which has to be closed using the * {@link org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager#close()} method. * * @param address The remote address to connect to * @param port The remote port * @return A domain client */ public static ServerDeploymentManager create(final InetAddress address, int port) { return create(ModelControllerClient.Factory.create(address, port), true); }
public DomainDeploymentUtils() throws UnknownHostException { this(ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999, DemoAuthentication.getCallbackHandler())); this.injectedClient = false; }
/** * Create an {@link ServerDeploymentManager} instance for a remote address and port. * * This creates a {@code ModelControllerClient} which has to be closed using the * {@link org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager#close()} method. * * @param address The remote address to connect to * @param port The remote port * @return A domain client */ public static ServerDeploymentManager create(final InetAddress address, int port) { return create(ModelControllerClient.Factory.create(address, port), true); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param protocol The prototcol to use. If this is http-remoting or https-remoting http upgrade will be used rather than the native remote protocol * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @return A model controller client * @throws UnknownHostException if the host cannot be found */ public static ModelControllerClient create(final String protocol, final String hostName, final int port, final CallbackHandler handler) throws UnknownHostException { return create(ClientConfigurationImpl.create(protocol, hostName, port, handler)); }
@Test public void testCurrent() throws Exception { test(ModelControllerClient.Factory.create(CONTROLLER_ADDRESS, 9999)); }
/** * Waits up to one minute until the jar deployment completes successfully, namely invocation of DMR operation * "/deployment=filter-marshaller.jar/:read-attribute(name=status)" yields "success". */ private void waitForDeploymentCompletion() throws Exception { ModelControllerClient controllerClient = ModelControllerClient.Factory.create(server1.getHotrodEndpoint().getInetAddress().getHostName(), SERVER1_MGMT_PORT); PathAddress address = PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT, FILTER_MARSHALLER_DEPLOYMENT_JAR)); ModelNode op = new ModelNode(); op.get(OP).set(READ_ATTRIBUTE_OPERATION); op.get(OP_ADDR).set(address.toModelNode()); op.get(NAME).set(STATUS); eventually(() -> SUCCESS.equals(controllerClient.execute(op).get(OUTCOME).asString()), 60000); }
/** * Create a client instance for a remote address and port and CallbackHandler. * * @param hostName the remote host * @param port the port * @param handler CallbackHandler to obtain authentication information for the call. * @param sslContext a pre-initialised SSLContext * @return A model controller client * @throws UnknownHostException if the host cannot be found */ public static ModelControllerClient create(final String hostName, final int port, final CallbackHandler handler, final SSLContext sslContext, final int connectionTimeout) throws UnknownHostException { return create(ClientConfigurationImpl.create(hostName, port, handler, sslContext, connectionTimeout)); }
public DomainClientImpl(String protocol, InetAddress address, int port, CallbackHandler handler) { this.delegate = ModelControllerClient.Factory.create(protocol, address, port, handler); } public DomainClientImpl(ModelControllerClient delegate) {
public DeploymentUtils() throws UnknownHostException { this.client = ModelControllerClient.Factory.create("localhost", 9999, DemoAuthentication.getCallbackHandler()); manager = ServerDeploymentManager.Factory.create(client); }