RemoteConnectionChannel(final RemoteConnectionHandler connectionHandler, final RemoteConnection connection, final int channelId, final int outboundWindow, final int inboundWindow, final int maxOutboundMessages, final int maxInboundMessages, final long maxOutboundMessageSize, final long maxInboundMessageSize) { super(connectionHandler.getConnectionContext().getConnectionProviderContext().getExecutor(), true); this.maxOutboundMessageSize = maxOutboundMessageSize; this.maxInboundMessageSize = maxInboundMessageSize; connectionHandlerContext = connectionHandler.getConnectionContext(); this.connectionHandler = connectionHandler; this.connection = connection; this.channelId = channelId; this.outboundWindow = outboundWindow; this.inboundWindow = inboundWindow; this.maxOutboundMessages = maxOutboundMessages; this.maxInboundMessages = maxInboundMessages; }
RemoteConnectionProvider(final OptionMap optionMap, final ConnectionProviderContext connectionProviderContext, final String protocolName) throws IOException { super(connectionProviderContext.getExecutor()); sslRequired = optionMap.get(Options.SECURE, false); xnioWorker = connectionProviderContext.getXnioWorker();
xnioWorker.openStreamConnection(destination, null, connectOptions) : xnioWorker.openStreamConnection(bindAddress, destination, null, null, connectOptions); final FutureResult<SslConnection> futureResult = new FutureResult<>(connectionProviderContext.getExecutor()); futureResult.addCancelHandler(futureConnection); futureConnection.addNotifier(new IoFuture.HandlingNotifier<StreamConnection, FutureResult<SslConnection>>() {
RemoteConnectionChannel(final RemoteConnectionHandler connectionHandler, final RemoteConnection connection, final int channelId, final int outboundWindow, final int inboundWindow, final int maxOutboundMessages, final int maxInboundMessages, final long maxOutboundMessageSize, final long maxInboundMessageSize) { super(connectionHandler.getConnectionContext().getConnectionProviderContext().getExecutor(), true); this.maxOutboundMessageSize = maxOutboundMessageSize; this.maxInboundMessageSize = maxInboundMessageSize; connectionHandlerContext = connectionHandler.getConnectionContext(); this.connectionHandler = connectionHandler; this.connection = connection; this.channelId = channelId; this.outboundWindow = outboundWindow; this.inboundWindow = inboundWindow; this.maxOutboundMessages = maxOutboundMessages; this.maxInboundMessages = maxInboundMessages; }
RemoteConnectionChannel(final RemoteConnectionHandler connectionHandler, final RemoteConnection connection, final int channelId, final int outboundWindow, final int inboundWindow, final int maxOutboundMessages, final int maxInboundMessages, final long maxOutboundMessageSize, final long maxInboundMessageSize) { super(connectionHandler.getConnectionContext().getConnectionProviderContext().getExecutor(), true); this.maxOutboundMessageSize = maxOutboundMessageSize; this.maxInboundMessageSize = maxInboundMessageSize; connectionHandlerContext = connectionHandler.getConnectionContext(); this.connectionHandler = connectionHandler; this.connection = connection; this.channelId = channelId; this.outboundWindow = outboundWindow; this.inboundWindow = inboundWindow; this.maxOutboundMessages = maxOutboundMessages; this.maxInboundMessages = maxInboundMessages; }
RemoteConnectionProvider(final OptionMap optionMap, final ConnectionProviderContext connectionProviderContext, final String protocolName) throws IOException { super(connectionProviderContext.getExecutor()); sslRequired = optionMap.get(Options.SECURE, false); xnioWorker = connectionProviderContext.getXnioWorker();
RemoteConnectionProvider(final OptionMap optionMap, final ConnectionProviderContext connectionProviderContext) throws IOException { super(connectionProviderContext.getExecutor()); xnio = connectionProviderContext.getXnio(); sslEnabled = optionMap.get(Options.SSL_ENABLED, true); xnioWorker = connectionProviderContext.getXnioWorker(); this.connectionProviderContext = connectionProviderContext; MBeanServer server = null; ObjectName objectName = null; try { server = ManagementFactory.getPlatformMBeanServer(); objectName = new ObjectName("jboss.remoting.handler", "name", connectionProviderContext.getEndpoint().getName() + "-" + hashCode()); server.registerMBean(new RemoteConnectionProviderMXBean() { public void dumpConnectionState() { doDumpConnectionState(); } public String dumpConnectionStateToString() { return doGetConnectionState(); } }, objectName); } catch (Exception e) { // ignore } this.server = server; this.objectName = objectName; }
public Cancellable open(final String serviceType, final Result<Channel> result, final OptionMap optionMap) { LocalChannel channel = new LocalChannel(executor, context); try { final OpenListener openListener = context.getServiceOpenListener(serviceType); if (openListener == null) { throw new ServiceNotFoundException("Unable to find service type '" + serviceType + "'"); } context.getConnectionProviderContext().getExecutor().execute(SpiUtils.getServiceOpenTask(channel.getOtherSide(), openListener)); } catch (ServiceNotFoundException e) { result.setException(e); return nullCancellable(); } result.setResult(channel); return nullCancellable(); }
xnioWorker.openStreamConnection(destination, null, connectOptions) : xnioWorker.openStreamConnection(bindAddress, destination, null, null, connectOptions); final FutureResult<SslConnection> futureResult = new FutureResult<>(connectionProviderContext.getExecutor()); futureResult.addCancelHandler(futureConnection); futureConnection.addNotifier(new IoFuture.HandlingNotifier<StreamConnection, FutureResult<SslConnection>>() {