Class AbstractPrefetchInputStreamByteReceiver

    • Constructor Detail

      • AbstractPrefetchInputStreamByteReceiver

        public AbstractPrefetchInputStreamByteReceiver​(java.util.concurrent.ExecutorService aExecutorService)
        Creates an AbstractPrefetchInputStreamByteReceiver using the given ExecutorService required for thread generation in an JEE environment.
        Parameters:
        aExecutorService - The ExecutorService to be used, when null then an ExecutorService something line Executors.newCachedThreadPool() is then retrieved.
      • AbstractPrefetchInputStreamByteReceiver

        public AbstractPrefetchInputStreamByteReceiver​(int aQueueCapacity,
                                                       java.util.concurrent.ExecutorService aExecutorService)
        Creates an AbstractPrefetchInputStreamByteReceiver using the given ExecutorService required for thread generation in an JEE environment.
        Parameters:
        aQueueCapacity - The capacity of the prefetch queue before it blocks until data is read via AbstractByteReceiver.readDatagram() ( AbstractByteReceiver.readDatagrams()).
        aExecutorService - The ExecutorService to be used, when null then an ExecutorService something line Executors.newCachedThreadPool() is then retrieved.
    • Method Detail

      • close

        public void close​()
                   throws org.refcodes.component.CloseException
        Specified by:
        close in interface org.refcodes.component.Closable
        Overrides:
        close in class AbstractByteReceiver
        Throws:
        org.refcodes.component.CloseException
      • open

        protected void open​(java.io.InputStream aInputStream)
                     throws org.refcodes.component.OpenException
        Open, see also ConnectionOpenable.open(Object).
        Parameters:
        aInputStream - the input stream
        Throws:
        org.refcodes.component.OpenException - the open exception
      • isOpenable

        protected boolean isOpenable​(java.io.InputStream aInputStream)
        Checks if is openable. See also ConnectionOpenable.ConnectionOpenAutomaton.isOpenable(Object).
        Parameters:
        aInputStream - the input stream
        Returns:
        true, if is openable