Class ServerSocketListener<T extends Client>

  • All Implemented Interfaces:
    ServerListener<T>, java.io.Closeable, java.lang.AutoCloseable

    @Deprecated(since="2022-01-27")
    public abstract class ServerSocketListener<T extends Client>
    extends java.lang.Object
    implements ServerListener<T>
    Deprecated.
    This internal logback API is not supported by AEM as a Cloud Service.
    A ServerListener that accepts connections on a ServerSocket.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerSocketListener​(java.net.ServerSocket serverSocket)
      Deprecated.
      Constructs a new listener.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      T acceptClient()
      Deprecated.
      Accepts the next client that appears on this listener.
      void close()
      Deprecated.
      Closes any underlying Closeable resources associated with this listener.
      java.lang.String toString()
      Deprecated.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServerSocketListener

        public ServerSocketListener​(java.net.ServerSocket serverSocket)
        Deprecated.
        Constructs a new listener.
        Parameters:
        serverSocket - server socket delegate
    • Method Detail

      • acceptClient

        public T acceptClient()
                       throws java.io.IOException
        Deprecated.
        Accepts the next client that appears on this listener.

        An implementation of this method is expected to block the calling thread and not return until either a client appears or an exception occurs.

        Specified by:
        acceptClient in interface ServerListener<T extends Client>
        Returns:
        client object
        Throws:
        java.io.IOException
      • close

        public void close()
        Deprecated.
        Closes any underlying Closeable resources associated with this listener.

        Note that (as described in Doug Lea's discussion about interrupting I/O operations in "Concurrent Programming in Java" (Addison-Wesley Professional, 2nd edition, 1999) this method is used to interrupt any blocked I/O operation in the client when the server is shutting down. The client implementation must anticipate this potential, and gracefully exit when the blocked I/O operation throws the relevant IOException subclass.

        Note also, that unlike Closeable.close() this method is not permitted to propagate any IOException that occurs when closing the underlying resource(s).

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface ServerListener<T extends Client>
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object