Class NioServer

java.lang.Object
com.google.common.util.concurrent.AbstractExecutionThreadService
org.bitcoinj.net.NioServer
All Implemented Interfaces:
com.google.common.util.concurrent.Service

public class NioServer extends com.google.common.util.concurrent.AbstractExecutionThreadService
Creates a simple server listener which listens for incoming client connections and uses a StreamConnection to process data.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Constructor Summary

    Constructors
    Constructor
    Description
    NioServer(StreamConnectionFactory connectionFactory, InetSocketAddress bindAddress)
    Creates a new server which is capable of listening for incoming connections and processing client provided data using StreamConnections created by the given StreamConnectionFactory
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    run()
     
    void
    Invoked by the Execution service when it's time to stop.

    Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService

    addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, shutDown, startAsync, startUp, state, stopAsync, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • run

      protected void run() throws Exception
      Specified by:
      run in class com.google.common.util.concurrent.AbstractExecutionThreadService
      Throws:
      Exception
    • triggerShutdown

      public void triggerShutdown()
      Invoked by the Execution service when it's time to stop. Calling this method directly will NOT stop the service, call AbstractExecutionThreadService.stopAsync() instead.
      Overrides:
      triggerShutdown in class com.google.common.util.concurrent.AbstractExecutionThreadService