Package cmion.util

Class SocketListener

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    FAtiMAListenerThread

    public abstract class SocketListener
    extends java.lang.Thread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int maxSize  
      protected java.net.Socket socket  
      protected boolean stopped  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      SocketListener​(java.net.Socket socket)
      Creates new SocketListener
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void initialize()  
      protected abstract void processMessage​(java.lang.String msg)  
      void run()  
      boolean send​(java.lang.String msg)  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • maxSize

        protected int maxSize
      • socket

        protected java.net.Socket socket
      • stopped

        protected boolean stopped
    • Constructor Detail

      • SocketListener

        public SocketListener​(java.net.Socket socket)
        Creates new SocketListener
    • Method Detail

      • initialize

        public void initialize()
      • close

        public void close()
      • processMessage

        protected abstract void processMessage​(java.lang.String msg)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • send

        public boolean send​(java.lang.String msg)