/** * Create an endpoint with the given configuration and existing worker. * * @param endpointName the name of the endpoint * @param xnioWorker the XNIO worker instance to use * @param optionMap the options to configure the endpoint * @return the new endpoint * @throws IOException if an error occurs */ public static Endpoint createEndpoint(final String endpointName, final XnioWorker xnioWorker, final OptionMap optionMap) throws IOException { if (endpointName == null) { throw new IllegalArgumentException("endpointName is null"); } if (optionMap == null) { throw new IllegalArgumentException("optionMap is null"); } final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(CREATE_ENDPOINT_PERM); } EndpointBuilder builder = Endpoint.builder(); builder.setXnioWorker(xnioWorker); builder.setEndpointName(endpointName); // JBEAP-14783 - legacy endpoint return new LegacyEndpoint(builder.build()); }
endpoint = endpointBuilder.build(); } catch (IOException e) { throw Logs.MAIN.failedToConstructEndpoint(e);
static Endpoint parseEndpoint() throws ConfigXMLParseException, IOException { final ClientConfiguration clientConfiguration = ClientConfiguration.getInstance(); final EndpointBuilder builder = new EndpointBuilder(); builder.setXnioWorker(XnioWorker.getContextManager().get()); if (clientConfiguration != null) try (final ConfigurationXMLStreamReader streamReader = clientConfiguration.readConfiguration(Collections.singleton(NS_REMOTING_5_0))) { parseDocument(streamReader, builder); return builder.build(); } else { return null; } }
endpoint = endpointBuilder.build(); } catch (IOException e) { throw Logs.MAIN.failedToConstructEndpoint(e);
builder.setEndpointName(endpointName); final Endpoint endpoint = builder.build(); endpointRef.set(endpoint);
endpoint = endpointBuilder.build(); } catch (IOException e) { throw Logs.MAIN.failedToConstructEndpoint(e);
endpoint = Endpoint.builder().setEndpointName("endpoint").build();
/** * Create an endpoint with the given configuration and existing worker. * * @param endpointName the name of the endpoint * @param xnioWorker the XNIO worker instance to use * @param optionMap the options to configure the endpoint * @return the new endpoint * @throws IOException if an error occurs */ public static Endpoint createEndpoint(final String endpointName, final XnioWorker xnioWorker, final OptionMap optionMap) throws IOException { if (endpointName == null) { throw new IllegalArgumentException("endpointName is null"); } if (optionMap == null) { throw new IllegalArgumentException("optionMap is null"); } final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(CREATE_ENDPOINT_PERM); } EndpointBuilder builder = Endpoint.builder(); builder.setXnioWorker(xnioWorker); builder.setEndpointName(endpointName); // JBEAP-14783 - legacy endpoint return new LegacyEndpoint(builder.build()); }
static DomainControllerClientConfig create(final ExecutorService executorService, boolean destroyExecutor) throws IOException { final Endpoint endpoint = Endpoint.builder().setEndpointName(ENDPOINT_NAME).build(); return new DomainControllerClientConfig(endpoint, executorService, destroyExecutor); }
static Endpoint parseEndpoint() throws ConfigXMLParseException, IOException { final ClientConfiguration clientConfiguration = ClientConfiguration.getInstance(); final EndpointBuilder builder = new EndpointBuilder(); builder.setXnioWorker(XnioWorker.getContextManager().get()); if (clientConfiguration != null) try (final ConfigurationXMLStreamReader streamReader = clientConfiguration.readConfiguration(Collections.singleton(NS_REMOTING_5_0))) { parseDocument(streamReader, builder); return builder.build(); } else { return null; } }
builder.setEndpointName(endpointName); final Endpoint endpoint = builder.build(); endpointRef.set(endpoint);
/** {@inheritDoc} */ public void start(final StartContext context) throws StartException { final Endpoint endpoint; final EndpointBuilder builder = Endpoint.builder(); builder.setEndpointName(endpointName); builder.setXnioWorker(worker.getValue()); try { endpoint = builder.build(); } catch (IOException e) { throw RemotingLogger.ROOT_LOGGER.couldNotStart(e); } // Reuse the options for the remote connection factory for now this.endpoint = endpoint; }
endpoint = Endpoint.builder().setEndpointName("endpoint").build();
endpoint = Endpoint.builder().setEndpointName("endpoint").build();
protected Channel getOrCreateChannel() throws IOException { synchronized (closeable) { if (closeable.closed) { throw ControllerClientLogger.ROOT_LOGGER.objectIsClosed(ModelControllerClient.class.getSimpleName()); } if (closeable.strategy == null) { try { closeable.endpoint = Endpoint.builder().setEndpointName("management-client").build(); final ProtocolConnectionConfiguration configuration = ProtocolConfigurationFactory.create(closeable.clientConfiguration, closeable.endpoint); closeable.strategy = ManagementClientChannelStrategy.create(configuration, closeable.channelAssociation, closeable.clientConfiguration.getCallbackHandler(), closeable.clientConfiguration.getSaslOptions(), closeable.clientConfiguration.getSSLContext(), new CloseHandler<Channel>() { @Override public void handleClose(final Channel closed, final IOException exception) { closeable.channelAssociation.handleChannelClosed(closed, exception); } }); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } return closeable.strategy.getChannel(); } }