Tabnine Logo
NioReceiver.bind
Code IndexAdd Tabnine to your IDE (free)

How to use
bind
method
in
org.apache.catalina.tribes.transport.nio.NioReceiver

Best Java code snippets using org.apache.catalina.tribes.transport.nio.NioReceiver.bind (Showing top 8 results out of 315)

origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource

protected void bind() throws IOException {
  // allocate an unbound server socket channel
  serverChannel = ServerSocketChannel.open();
  // Get the associated ServerSocket to bind it with
  ServerSocket serverSocket = serverChannel.socket();
  // create a new Selector for use below
  selector = Selector.open();
  // set the port the server channel will listen to
  //serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
  bind(serverSocket,getTcpListenPort(),getAutoBind());
  // set non-blocking mode for the listening socket
  serverChannel.configureBlocking(false);
  // register the ServerSocketChannel with the Selector
  serverChannel.register(selector, SelectionKey.OP_ACCEPT);
  
}

origin: org.apache.tomcat/tomcat-tribes

protected void bind() throws IOException {
  // allocate an unbound server socket channel
  serverChannel = ServerSocketChannel.open();
  // Get the associated ServerSocket to bind it with
  ServerSocket serverSocket = serverChannel.socket();
  // create a new Selector for use below
  this.selector.set(Selector.open());
  // set the port the server channel will listen to
  //serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
  bind(serverSocket,getPort(),getAutoBind());
  // set non-blocking mode for the listening socket
  serverChannel.configureBlocking(false);
  // register the ServerSocketChannel with the Selector
  serverChannel.register(this.selector.get(), SelectionKey.OP_ACCEPT);
  //set up the datagram channel
  if (this.getUdpPort()>0) {
    datagramChannel = DatagramChannel.open();
    configureDatagraChannel();
    //bind to the address to avoid security checks
    bindUdp(datagramChannel.socket(),getUdpPort(),getAutoBind());
  }
}
origin: codefollower/Tomcat-Research

protected void bind() throws IOException {
  // allocate an unbound server socket channel
  serverChannel = ServerSocketChannel.open();
  // Get the associated ServerSocket to bind it with
  ServerSocket serverSocket = serverChannel.socket();
  // create a new Selector for use below
  synchronized (Selector.class) {
    // Selector.open() isn't thread safe
    // http://bugs.sun.com/view_bug.do?bug_id=6427854
    // Affects 1.6.0_29, fixed in 1.7.0_01
    this.selector.set(Selector.open());
  }
  // set the port the server channel will listen to
  //serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
  bind(serverSocket,getPort(),getAutoBind());
  // set non-blocking mode for the listening socket
  serverChannel.configureBlocking(false);
  // register the ServerSocketChannel with the Selector
  serverChannel.register(this.selector.get(), SelectionKey.OP_ACCEPT);
  //set up the datagram channel
  if (this.getUdpPort()>0) {
    datagramChannel = DatagramChannel.open();
    configureDatagraChannel();
    //bind to the address to avoid security checks
    bindUdp(datagramChannel.socket(),getUdpPort(),getAutoBind());
  }
}
origin: org.apache.catalina.springsource/com.springsource.org.apache.catalina.tribes.springsource

/**
 * start cluster receiver
 * @throws Exception
 * @see org.apache.catalina.tribes.ClusterReceiver#start()
 */
public void start() throws IOException {
  super.start();
  try {
    setPool(new RxTaskPool(getMaxThreads(),getMinThreads(),this));
  } catch (Exception x) {
    log.fatal("ThreadPool can initilzed. Listener not started", x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
  try {
    getBind();
    bind();
    Thread t = new Thread(this, "NioReceiver");
    t.setDaemon(true);
    t.start();
  } catch (Exception x) {
    log.fatal("Unable to start cluster receiver", x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
}

origin: org.apache.geronimo.ext.tomcat/tribes

protected void bind() throws IOException {
  // allocate an unbound server socket channel
  serverChannel = ServerSocketChannel.open();
  // Get the associated ServerSocket to bind it with
  ServerSocket serverSocket = serverChannel.socket();
  // create a new Selector for use below
  synchronized (Selector.class) {
    // Selector.open() isn't thread safe
    // http://bugs.sun.com/view_bug.do?bug_id=6427854
    // Affects 1.6.0_29, fixed in 1.7.0_01
    this.selector.set(Selector.open());
  }
  // set the port the server channel will listen to
  //serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
  bind(serverSocket,getPort(),getAutoBind());
  // set non-blocking mode for the listening socket
  serverChannel.configureBlocking(false);
  // register the ServerSocketChannel with the Selector
  serverChannel.register(this.selector.get(), SelectionKey.OP_ACCEPT);
  //set up the datagram channel
  if (this.getUdpPort()>0) {
    datagramChannel = DatagramChannel.open();
    configureDatagraChannel();
    //bind to the address to avoid security checks
    bindUdp(datagramChannel.socket(),getUdpPort(),getAutoBind());
  }
}
origin: org.apache.geronimo.ext.tomcat/tribes

/**
 * start cluster receiver
 * @throws IOException
 * @see org.apache.catalina.tribes.ChannelReceiver#start()
 */
@Override
public void start() throws IOException {
  super.start();
  try {
    setPool(new RxTaskPool(getMaxThreads(),getMinThreads(),this));
  } catch (Exception x) {
    log.fatal("ThreadPool can initilzed. Listener not started", x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
  try {
    getBind();
    bind();
    Thread t = new Thread(this, "NioReceiver");
    t.setDaemon(true);
    t.start();
  } catch (Exception x) {
    log.fatal("Unable to start cluster receiver", x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
}
origin: codefollower/Tomcat-Research

/**
 * start cluster receiver
 * @throws IOException
 * @see org.apache.catalina.tribes.ChannelReceiver#start()
 */
@Override
public void start() throws IOException {
  super.start();
  try {
    setPool(new RxTaskPool(getMaxThreads(),getMinThreads(),this));
  } catch (Exception x) {
    log.fatal(sm.getString("NioReceiver.threadpool.fail"), x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
  try {
    getBind();
    bind();
    Thread t = new Thread(this, "NioReceiver");
    t.setDaemon(true);
    t.start();
  } catch (Exception x) {
    log.fatal(sm.getString("NioReceiver.start.fail"), x);
    if ( x instanceof IOException ) throw (IOException)x;
    else throw new IOException(x.getMessage());
  }
}
origin: org.apache.tomcat/tomcat-tribes

bind();
String channelName = "";
if (getChannel().getName() != null) channelName = "[" + getChannel().getName() + "]";
org.apache.catalina.tribes.transport.nioNioReceiverbind

Popular methods of NioReceiver

  • addEvent
  • cancelledKey
  • doListen
  • events
  • getAutoBind
  • getBind
  • getExecutor
  • getMaxThreads
  • getMinThreads
  • getOoBInline
  • getRxBufSize
  • getSelectorTimeout
  • getRxBufSize,
  • getSelectorTimeout,
  • getSoKeepAlive,
  • getSoLingerOn,
  • getSoLingerTime,
  • getSoReuseAddress,
  • getSoTrafficClass,
  • getTaskPool,
  • getTcpNoDelay

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top PhpStorm plugins
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