congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TCPNIOTransport.bind
Code IndexAdd Tabnine to your IDE (free)

How to use
bind
method
in
org.glassfish.grizzly.nio.transport.TCPNIOTransport

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

origin: apache/incubator-dubbo

@Override
protected void doOpen() throws Throwable {
  FilterChainBuilder filterChainBuilder = FilterChainBuilder.stateless();
  filterChainBuilder.add(new TransportFilter());
  filterChainBuilder.add(new GrizzlyCodecAdapter(getCodec(), getUrl(), this));
  filterChainBuilder.add(new GrizzlyHandler(getUrl(), this));
  TCPNIOTransportBuilder builder = TCPNIOTransportBuilder.newInstance();
  ThreadPoolConfig config = builder.getWorkerThreadPoolConfig();
  config.setPoolName(SERVER_THREAD_POOL_NAME).setQueueLimit(-1);
  String threadpool = getUrl().getParameter(Constants.THREADPOOL_KEY, Constants.DEFAULT_THREADPOOL);
  if (Constants.DEFAULT_THREADPOOL.equals(threadpool)) {
    int threads = getUrl().getPositiveParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS);
    config.setCorePoolSize(threads).setMaxPoolSize(threads)
        .setKeepAliveTime(0L, TimeUnit.SECONDS);
  } else if ("cached".equals(threadpool)) {
    int threads = getUrl().getPositiveParameter(Constants.THREADS_KEY, Integer.MAX_VALUE);
    config.setCorePoolSize(0).setMaxPoolSize(threads)
        .setKeepAliveTime(60L, TimeUnit.SECONDS);
  } else {
    throw new IllegalArgumentException("Unsupported threadpool type " + threadpool);
  }
  builder.setKeepAlive(true).setReuseAddress(false)
      .setIOStrategy(SameThreadIOStrategy.getInstance());
  transport = builder.build();
  transport.setProcessor(filterChainBuilder.build());
  transport.bind(getBindAddress());
  transport.start();
}
origin: apache/incubator-dubbo

@Override
protected void doOpen() throws Throwable {
  FilterChainBuilder filterChainBuilder = FilterChainBuilder.stateless();
  filterChainBuilder.add(new TransportFilter());
  filterChainBuilder.add(new GrizzlyCodecAdapter(getCodec(), getUrl(), this));
  filterChainBuilder.add(new GrizzlyHandler(getUrl(), this));
  TCPNIOTransportBuilder builder = TCPNIOTransportBuilder.newInstance();
  ThreadPoolConfig config = builder.getWorkerThreadPoolConfig();
  config.setPoolName(SERVER_THREAD_POOL_NAME).setQueueLimit(-1);
  String threadpool = getUrl().getParameter(Constants.THREADPOOL_KEY, Constants.DEFAULT_THREADPOOL);
  if (Constants.DEFAULT_THREADPOOL.equals(threadpool)) {
    int threads = getUrl().getPositiveParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS);
    config.setCorePoolSize(threads).setMaxPoolSize(threads)
        .setKeepAliveTime(0L, TimeUnit.SECONDS);
  } else if ("cached".equals(threadpool)) {
    int threads = getUrl().getPositiveParameter(Constants.THREADS_KEY, Integer.MAX_VALUE);
    config.setCorePoolSize(0).setMaxPoolSize(threads)
        .setKeepAliveTime(60L, TimeUnit.SECONDS);
  } else {
    throw new IllegalArgumentException("Unsupported threadpool type " + threadpool);
  }
  builder.setKeepAlive(true).setReuseAddress(false)
      .setIOStrategy(SameThreadIOStrategy.getInstance());
  transport = builder.build();
  transport.setProcessor(filterChainBuilder.build());
  transport.bind(getBindAddress());
  transport.start();
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port)
    throws IOException {
  return bind(host, port, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final SocketAddress socketAddress)
    throws IOException {
  return bind(socketAddress, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final SocketAddress socketAddress)
    throws IOException {
  return bind(socketAddress, serverConnectionBackLog);
}
origin: org.mule.glassfish.grizzly/grizzly-framework

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final SocketAddress socketAddress)
    throws IOException {
  return bind(socketAddress, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port)
    throws IOException {
  return bind(host, port, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port)
    throws IOException {
  return bind(host, port, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final SocketAddress socketAddress)
    throws IOException {
  return bind(socketAddress, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final SocketAddress socketAddress)
    throws IOException {
  return bind(socketAddress, serverConnectionBackLog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port,
    final int backlog) throws IOException {
  return bind(new InetSocketAddress(host, port), backlog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port,
    final int backlog) throws IOException {
  return bind(new InetSocketAddress(host, port), backlog);
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port,
    final int backlog) throws IOException {
  return bind(new InetSocketAddress(host, port), backlog);
}
origin: org.mule.glassfish.grizzly/grizzly-framework

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final String host, final int port,
    final int backlog) throws IOException {
  return bind(new InetSocketAddress(host, port), backlog);
}
origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
origin: javaee/grizzly

/**
 * {@inheritDoc}
 */
@Override
public TCPNIOServerConnection bind(final int port) throws IOException {
  return bind(new InetSocketAddress(port));
}
org.glassfish.grizzly.nio.transportTCPNIOTransportbind

Popular methods of TCPNIOTransport

  • start
  • setProcessor
  • shutdownNow
  • isStopped
  • getAsyncQueueIO
  • setTcpNoDelay
  • setLinger
  • unbind
  • getProcessor
  • getServerConnectionBackLog
    Get the default server connection backlog size.
  • setIOStrategy
  • setKeepAlive
  • setIOStrategy,
  • setKeepAlive,
  • setSelectorRunnersCount,
  • setServerConnectionBackLog,
  • shutdown,
  • connect,
  • getLinger,
  • isKeepAlive,
  • isTcpNoDelay

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • 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