if (SaslUtils.evaluateResponse(saslServer, sendBuffer, buffer.getResource())) { server.tracef("Server sending authentication complete"); connectionProviderContext.accept(connectionContext -> { final Object qop = saslServer.getNegotiatedProperty(Sasl.QOP); if (!isInitial && ("auth-int".equals(qop) || "auth-conf".equals(qop))) {
RemoteConnectionProvider(final OptionMap optionMap, final ConnectionProviderContext connectionProviderContext, final String protocolName) throws IOException { super(connectionProviderContext.getExecutor()); sslRequired = optionMap.get(Options.SECURE, false); xnioWorker = connectionProviderContext.getXnioWorker(); this.connectionProviderContext = connectionProviderContext; MBeanServer server = null; try { server = ManagementFactory.getPlatformMBeanServer(); final String endpointName = connectionProviderContext.getEndpoint().getName(); String name; if (endpointName == null) {
ConnectionImpl(final EndpointImpl endpoint, final ConnectionHandlerFactory connectionHandlerFactory, final ConnectionProviderContext connectionProviderContext, final URI peerUri, final SaslAuthenticationFactory authenticationFactory, final AuthenticationConfiguration authenticationConfiguration, final String saslProtocol) { super(endpoint.getExecutor(), true); this.endpoint = endpoint; this.peerUri = peerUri; this.protocol = connectionProviderContext.getProtocol(); this.authenticationConfiguration = authenticationConfiguration; this.saslProtocol = saslProtocol; this.connectionHandler = connectionHandlerFactory.createInstance(endpoint.new LocalConnectionContext(connectionProviderContext, this)); this.authenticationFactory = authenticationFactory; this.peerIdentityContext = new ConnectionPeerIdentityContext(this, connectionHandler.getOfferedMechanisms(), getConnectionHandler().getPeerSaslServerName(), saslProtocol); }
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 String toString() { return String.format("Remoting remote connection provider %x for %s", Integer.valueOf(hashCode()), connectionProviderContext.getEndpoint()); }
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; }
public String toString() { return String.format("Remoting connection %08x to %s of %s", Integer.valueOf(hashCode()), connection.getPeerAddress(), getRemoteConnectionProvider().getConnectionProviderContext().getEndpoint()); } }
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>>() {
RemoteConnectionProvider(final OptionMap optionMap, final ConnectionProviderContext connectionProviderContext, final String protocolName) throws IOException { super(connectionProviderContext.getExecutor()); sslRequired = optionMap.get(Options.SECURE, false); xnioWorker = connectionProviderContext.getXnioWorker(); this.connectionProviderContext = connectionProviderContext; MBeanServer server = null; try { server = ManagementFactory.getPlatformMBeanServer(); final String endpointName = connectionProviderContext.getEndpoint().getName(); String name; if (endpointName == null) {
sendBuffer.put(Protocol.CAPABILITIES); ProtocolUtils.writeByte(sendBuffer, Protocol.CAP_VERSION, Protocol.VERSION); final String localEndpointName = connectionProviderContext.getEndpoint().getName(); if (localEndpointName != null) { ProtocolUtils.writeString(sendBuffer, Protocol.CAP_ENDPOINT_NAME, localEndpointName);
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; }
public Cancellable connect(final SocketAddress bindAddress, final SocketAddress destination, final OptionMap connectOptions, final Result<ConnectionHandlerFactory> result, final CallbackHandler callbackHandler, final XnioSsl xnioSsl) throws IllegalArgumentException { context.accept(new ConnectionHandlerFactory() { public ConnectionHandler createInstance(final ConnectionHandlerContext connectionContext) { return new LoopbackConnectionHandler(connectionContext); } }); return nullCancellable(); }
ConnectionImpl(final EndpointImpl endpoint, final ConnectionHandlerFactory connectionHandlerFactory, final ConnectionProviderContext connectionProviderContext, final URI peerUri, final SaslAuthenticationFactory authenticationFactory, final AuthenticationConfiguration authenticationConfiguration, final String saslProtocol) { super(endpoint.getExecutor(), true); this.endpoint = endpoint; this.peerUri = peerUri; this.protocol = connectionProviderContext.getProtocol(); this.authenticationConfiguration = authenticationConfiguration; this.saslProtocol = saslProtocol; this.connectionHandler = connectionHandlerFactory.createInstance(endpoint.new LocalConnectionContext(connectionProviderContext, this)); this.authenticationFactory = authenticationFactory; this.peerIdentityContext = new ConnectionPeerIdentityContext(this, connectionHandler.getOfferedMechanisms(), getConnectionHandler().getPeerSaslServerName(), saslProtocol); }
sendBuffer.put(Protocol.CAPABILITIES); ProtocolUtils.writeByte(sendBuffer, Protocol.CAP_VERSION, version); final String localEndpointName = connectionProviderContext.getEndpoint().getName(); if (localEndpointName != null) {
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; }
final Collection<Principal> principals = createPrincipals(); final UserInfo userInfo = authorizingCallbackHandler.createUserInfo(principals); connectionProviderContext.accept(new ConnectionHandlerFactory() { public ConnectionHandler createInstance(final ConnectionHandlerContext connectionContext) { final Object qop = saslServer.getNegotiatedProperty(Sasl.QOP);
public String toString() { return String.format("Remoting local connection provider %x for %s", Integer.valueOf(hashCode()), context.getEndpoint()); } }
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(); }
if (SaslUtils.evaluateResponse(saslServer, sendBuffer, buffer.getResource())) { server.tracef("Server sending authentication complete"); connectionProviderContext.accept(connectionContext -> { final Object qop = saslServer.getNegotiatedProperty(Sasl.QOP); if (!isInitial && ("auth-int".equals(qop) || "auth-conf".equals(qop))) {
public String toString() { return String.format("Remoting remote connection provider %x for %s", Integer.valueOf(hashCode()), connectionProviderContext.getEndpoint()); }