Package totalcross.io

Class StreamConnectionNotifier

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    SerialPortServer

    public abstract class StreamConnectionNotifier
    extends java.lang.Object
    Base class for connection notifiers.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract Stream accept()
      Returns a Stream that represents a server side connection.
      abstract void close()
      Closes this I/O connection, releasing any associated resources.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamConnectionNotifier

        public StreamConnectionNotifier()
    • Method Detail

      • accept

        public abstract Stream accept()
                               throws IOException
        Returns a Stream that represents a server side connection.
        Returns:
        A stream to communicate with a client.
        Throws:
        IOException - If an I/O error occurs.
      • close

        public abstract void close()
                            throws IOException
        Closes this I/O connection, releasing any associated resources. Once closed a connection is no longer valid.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        IOException - If an I/O error occurs.