RemoteConnectionHandler(final ConnectionHandlerContext connectionContext, final RemoteConnection remoteConnection, final int maxInboundChannels, final int maxOutboundChannels, final Principal principal, final String remoteEndpointName, final int behavior, final boolean supportsRemoteAuth, final Set<String> offeredMechanisms, final String peerSaslServerName, final String localSaslServerName) { super(remoteConnection.getExecutor()); this.connectionContext = connectionContext; this.remoteConnection = remoteConnection; this.maxInboundChannels = maxInboundChannels; this.maxOutboundChannels = maxOutboundChannels; this.principal = principal; this.remoteEndpointName = remoteEndpointName; this.behavior = behavior; this.supportsRemoteAuth = supportsRemoteAuth; this.offeredMechanisms = offeredMechanisms; this.peerSaslServerName = peerSaslServerName; this.localSaslServerName = localSaslServerName; }
RemoteReadListener(final RemoteConnectionHandler handler, final RemoteConnection connection) { synchronized (connection.getLock()) { connection.getConnection().getCloseSetter().set((ChannelListener<Channel>) channel -> connection.getExecutor().execute(() -> { handler.handleConnectionClose(); handler.closeComplete(); })); } this.handler = handler; this.connection = connection; }
connection.getExecutor().execute(SpiUtils.getServiceOpenTask(connectionChannel, openListener)); break; } finally {
final SaslClient usedSaslClient = saslClient; final Authentication authentication = new Authentication(usedSaslClient, remoteServerName, remoteEndpointName, behavior, channelsIn, channelsOut, authCap, offeredMechs); connection.getExecutor().execute(() -> { final byte[] response; try {
client.trace("Client received authentication challenge"); messageReader.suspendReads(); connection.getExecutor().execute(() -> { try { final boolean clientComplete = saslClient.isComplete(); client.trace("Client received authentication complete"); messageReader.suspendReads(); connection.getExecutor().execute(() -> { try { final boolean clientComplete = saslClient.isComplete();
server.tracef("Server received authentication response"); suspendReads(); connection.getExecutor().execute(new AuthStepRunnable(false, saslServer, message, remoteEndpointName, behavior, maxInboundChannels, maxOutboundChannels, authCap, offeredMechanisms)); free = false; return;
connection.getExecutor().execute(new AuthStepRunnable(true, saslServer, message, remoteEndpointName, behavior, channelsIn, channelsOut, authCap, null)); free = false; return;
RemoteConnectionHandler(final ConnectionHandlerContext connectionContext, final RemoteConnection remoteConnection, final int maxInboundChannels, final int maxOutboundChannels, final Principal principal, final String remoteEndpointName, final int behavior, final boolean supportsRemoteAuth, final Set<String> offeredMechanisms, final String peerSaslServerName, final String localSaslServerName) { super(remoteConnection.getExecutor()); this.connectionContext = connectionContext; this.remoteConnection = remoteConnection; this.maxInboundChannels = maxInboundChannels; this.maxOutboundChannels = maxOutboundChannels; this.principal = principal; this.remoteEndpointName = remoteEndpointName; this.behavior = behavior; this.supportsRemoteAuth = supportsRemoteAuth; this.offeredMechanisms = offeredMechanisms; this.peerSaslServerName = peerSaslServerName; this.localSaslServerName = localSaslServerName; }
public void handleEvent(final java.nio.channels.Channel channel) { connection.getExecutor().execute(new Runnable() { public void run() { handler.handleConnectionClose(); handler.closeComplete(); } }); } });
RemoteConnectionHandler(final ConnectionHandlerContext connectionContext, final RemoteConnection remoteConnection, final Collection<Principal> principals, final UserInfo userInfo, final int maxInboundChannels, final int maxOutboundChannels, final String remoteEndpointName, final int behavior) { super(remoteConnection.getExecutor()); this.connectionContext = connectionContext; this.remoteConnection = remoteConnection; this.maxInboundChannels = maxInboundChannels; this.maxOutboundChannels = maxOutboundChannels; this.remoteEndpointName = remoteEndpointName; this.behavior = behavior; this.principals = Collections.unmodifiableCollection(principals); this.userInfo = userInfo; }
private void closeMessages() { Executor executor = connection.getExecutor(); synchronized (connection.getLock()) { for (final InboundMessage message : inboundMessages) { executor.execute(new Runnable() { public void run() { message.inputStream.pushException(new MessageCancelledException()); } }); } for (final OutboundMessage message : outboundMessages) { executor.execute(new Runnable() { public void run() { message.cancel(); } }); } for (final InboundMessage message : inboundMessageQueue) { executor.execute(new Runnable() { public void run() { message.terminate(); } }); } inboundMessageQueue.clear(); } }
RemoteReadListener(final RemoteConnectionHandler handler, final RemoteConnection connection) { synchronized (connection.getLock()) { connection.getConnection().getCloseSetter().set((ChannelListener<Channel>) channel -> connection.getExecutor().execute(() -> { handler.handleConnectionClose(); handler.closeComplete(); })); } this.handler = handler; this.connection = connection; }
connection.getExecutor().execute(SpiUtils.getServiceOpenTask(connectionChannel, openListener)); break; } finally {
final SaslClient usedSaslClient = saslClient; final Authentication authentication = new Authentication(usedSaslClient, remoteServerName, remoteEndpointName, behavior, channelsIn, channelsOut, authCap, offeredMechs); connection.getExecutor().execute(() -> { final byte[] response; try {
client.trace("Client received authentication challenge"); channel.suspendReads(); connection.getExecutor().execute(new Runnable() { public void run() { try { client.trace("Client received authentication complete"); channel.suspendReads(); connection.getExecutor().execute(new Runnable() { public void run() { try {
client.trace("Client received authentication challenge"); messageReader.suspendReads(); connection.getExecutor().execute(() -> { try { final boolean clientComplete = saslClient.isComplete(); client.trace("Client received authentication complete"); messageReader.suspendReads(); connection.getExecutor().execute(() -> { try { final boolean clientComplete = saslClient.isComplete();
server.tracef("Server received authentication response"); connection.getChannel().suspendReads(); connection.getExecutor().execute(new AuthStepRunnable(false, saslServer, authorizingCallbackHandler, pooledBuffer, remoteEndpointName, behavior, maxInboundChannels, maxOutboundChannels)); free = false; return;
server.tracef("Server received authentication response"); suspendReads(); connection.getExecutor().execute(new AuthStepRunnable(false, saslServer, message, remoteEndpointName, behavior, maxInboundChannels, maxOutboundChannels, authCap, offeredMechanisms)); free = false; return;
connection.getExecutor().execute(new AuthStepRunnable(true, saslServer, callbackHandler, pooledBuffer, remoteEndpointName, behavior, channelsIn, channelsOut)); free = false; return;
connection.getExecutor().execute(new AuthStepRunnable(true, saslServer, message, remoteEndpointName, behavior, channelsIn, channelsOut, authCap, null)); free = false; return;