src/main/java/pityoulish/sockets/server/SimplisticSocketHandler.java
public void run()
  {
    final Thread runner = Thread.currentThread();

    // access to handlerThread not synchronized, the attribute is volatile
    while (handlerThread == runner)
     {
       try
        {
          acceptAndServeRequest();
        }
       catch (ProtocolException px)
        {
          // stack trace already logged when thrown
          System.out.println(px.toString());
        }
       catch (Exception x)
        {
          Log.log(logger, "SocketHandler", x);
          System.out.println(x.toString());
        }
     }
  }
/**
   * Executed by the thread running this handler.
   */
Executed by the thread running this handler.
Executed by the thread running this handler .
public void run()
  {
    final Thread runner = Thread.currentThread();
    while (handlerThread == runner)
     {
       try
        {
          acceptAndServeRequest();
        }
       catch (ProtocolException px)
        {
          System.out.println(px.toString());
        }
       catch (Exception x)
        {
          Log.log(logger, "SocketHandler", x);
          System.out.println(x.toString());
        }
     }
  }
public void run ( ) { final Thread runner = Thread . currentThread ( ) ; while ( handlerThread == runner ) { try { acceptAndServeRequest ( ) ; } catch ( ProtocolException px ) { System . out . println ( px . toString ( ) ) ; } catch ( Exception x ) { Log . log ( logger , "SocketHandler" , x ) ; System . out . println ( x . toString ( ) ) ; } } }
Executed by the thread running this handler.
Executed by the thread running this handler .
// access to handlerThread not synchronized, the attribute is volatile // stack trace already logged when thrown