org.licas.server

## Class ServerConnectionAsyc

- java.lang.Object
- - java.lang.Thread
  - - org.licas.server.ServerConnection
    - - org.licas.server.ServerConnectionAsyc

- All Implemented Interfaces:
    java.lang.Runnable

      public class ServerConnectionAsyc
      extends ServerConnection

  This class handles a single HTTP non-blocking (asynchronous) transaction on a separate thread. It uses a `Channel` to pass information and a `ServerHandler` to process the message. Asynchronous is recognised by a `void` return type and runs on port '(blocking server port + 1)'.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class org.licas.server.ServerConnection

      `channel, HTTPGSTART, HTTPMEND, HTTPPSTART, port, serverHandler, syncOn, timeOut`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerConnectionAsyc(java.nio.channels.AsynchronousSocketChannel theChannel, long timeOut, ServerHandler serverHandler)` Create a new instance of ServerListenerAsync.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` Start the message processing

    - ### Methods inherited from class org.licas.server.ServerConnection

      `convertRequest, httpHeaders`

    - ### Methods inherited from class java.lang.Thread

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ServerConnectionAsyc

          public ServerConnectionAsyc(java.nio.channels.AsynchronousSocketChannel theChannel,
                                      long timeOut,
                                      ServerHandler serverHandler)
                               throws java.lang.Exception

      Create a new instance of ServerListenerAsync.
      Parameters:
        `theChannel` - the listener channel.
        `timeOut` - timeout for receiving continuous message.
        `serverHandler` - the server handler that processes the message.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### run

          public void run()

      Start the message processing
      Specified by:
        `run` in interface `java.lang.Runnable`
      Overrides:
        `run` in class `java.lang.Thread`