Tabnine Logo
ChannelConfigurator
Code IndexAdd Tabnine to your IDE (free)

How to use
ChannelConfigurator
in
org.glassfish.grizzly.nio

Best Java code snippets using org.glassfish.grizzly.nio.ChannelConfigurator (Showing top 20 results out of 315)

origin: org.glassfish.grizzly/grizzly-http-server-core

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: org.mule.glassfish.grizzly/grizzly-framework

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: org.mule.glassfish.grizzly/grizzly-framework

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: javaee/grizzly

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: org.glassfish.grizzly/grizzly-websockets-server

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: javaee/grizzly

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: javaee/grizzly

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: org.glassfish.grizzly/grizzly-core

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: javaee/grizzly

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: org.glassfish.grizzly/grizzly-websockets-server

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: javaee/grizzly

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: org.glassfish.grizzly/grizzly-core

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: javaee/grizzly

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: javaee/grizzly

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: javaee/grizzly

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: javaee/grizzly

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: org.glassfish.grizzly/grizzly-http-server-core

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
origin: javaee/grizzly

private void configureAcceptedChannel(final SocketChannel acceptedChannel)
    throws IOException {
  final TCPNIOTransport tcpNIOTransport = (TCPNIOTransport) transport;
  tcpNIOTransport.getChannelConfigurator()
      .preConfigure(transport, acceptedChannel);
  tcpNIOTransport.getChannelConfigurator()
      .postConfigure(transport, acceptedChannel);
}
origin: javaee/grizzly

protected static void onConnectedAsync(final TCPNIOConnection connection,
    final CompletionHandler<Connection> completionHandler)
    throws IOException {
  final TCPNIOTransport tcpTransport =
      (TCPNIOTransport) connection.getTransport();
  final SocketChannel channel = (SocketChannel) connection.getChannel();
  
  try {
    if (!channel.isConnected()) {
      channel.finishConnect();
    }
    connection.resetProperties();
    // Deregister OP_CONNECT interest
    connection.disableIOEvent(IOEvent.CLIENT_CONNECTED);
    // we can call configure for ready channel
    tcpTransport.getChannelConfigurator().postConfigure(tcpTransport, channel);
  } catch (Exception e) {
    abortConnection(connection, completionHandler, e);
    throw Exceptions.makeIOException(e);
  }
  
  if (connection.notifyReady()) {
    tcpTransport.fireIOEvent(IOEvent.CONNECTED, connection,
        new EnableReadHandler(completionHandler));
  }
}
origin: javaee/grizzly

nioTransport.getChannelConfigurator().preConfigure(
    nioTransport, socketChannel);
org.glassfish.grizzly.nioChannelConfigurator

Javadoc

Configurator responsible for initial SelectableChannel configuration. Such a configurator(s) could be used by NIOTransport to customize configuration of newly created NIOConnections. Depending on NIOTransport nature, could be used both for client and server side connections.

Most used methods

  • postConfigure
    This method is called by a NIOTransport to configure newly created SelectableChannel once it's been
  • preConfigure
    This method is called by a NIOTransport to configure newly created SelectableChannel at the very ear

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Notification (javax.management)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now