Class AbstractBasicLayer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.CountDownLatch endController
      Countdown for managing threads running.
      protected java.io.InputStream inputStream
      Input stream.
      protected org.apache.logging.log4j.Logger logger
      Logger object.
      protected java.io.OutputStream outputStream
      Output stream.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractBasicLayer​(java.lang.Class<?> caller, java.lang.String layerName)
      Constructor of Layer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int rangeCheck​(int iInput)
      Private range check function for byte values.
      void run()
      Thread entry function for layer work.
      void setAction​(GlobalData.Action newAction)
      Property setter for action.
      void setEndController​(java.util.concurrent.CountDownLatch newEndController)
      Property setter for endcontroller.
      void setInputStream​(java.io.InputStream newInputStream)
      Property setter for input stream.
      void setOutputStream​(java.io.OutputStream newOutputStream)
      property setter for output stream.
      void setRealLayerName​(java.lang.String newRealLayerName)
      Property setter for realLayerName.
      java.lang.String toString()
      Show a human readable name of the layer.
      • Methods inherited from class java.lang.Object

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

      • inputStream

        protected java.io.InputStream inputStream
        Input stream.
      • outputStream

        protected java.io.OutputStream outputStream
        Output stream.
      • logger

        protected final org.apache.logging.log4j.Logger logger
        Logger object.
      • endController

        protected java.util.concurrent.CountDownLatch endController
        Countdown for managing threads running.
    • Constructor Detail

      • AbstractBasicLayer

        protected AbstractBasicLayer​(java.lang.Class<?> caller,
                                     java.lang.String layerName)
        Constructor of Layer.
        Parameters:
        caller - class object
        layerName - name of real layer
    • Method Detail

      • toString

        public final java.lang.String toString()
        Show a human readable name of the layer.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a human readable name of the layer
        See Also:
        Object.toString()
      • rangeCheck

        protected final int rangeCheck​(int iInput)
        Private range check function for byte values.
        Parameters:
        iInput - as input value
        Returns:
        range checked byte value
      • setInputStream

        public final void setInputStream​(java.io.InputStream newInputStream)
        Description copied from interface: Layer
        Property setter for input stream.
        Specified by:
        setInputStream in interface Layer
        Parameters:
        newInputStream - the new stream
      • setOutputStream

        public final void setOutputStream​(java.io.OutputStream newOutputStream)
        Description copied from interface: Layer
        property setter for output stream.
        Specified by:
        setOutputStream in interface Layer
        Parameters:
        newOutputStream - the new output stream
      • setAction

        public final void setAction​(GlobalData.Action newAction)
        Description copied from interface: Layer
        Property setter for action.
        Specified by:
        setAction in interface Layer
        Parameters:
        newAction - the new action
      • setEndController

        public final void setEndController​(java.util.concurrent.CountDownLatch newEndController)
        Property setter for endcontroller.
        Parameters:
        newEndController - the new endcontroller
      • setRealLayerName

        public final void setRealLayerName​(java.lang.String newRealLayerName)
        Description copied from interface: Layer
        Property setter for realLayerName.
        Specified by:
        setRealLayerName in interface Layer
        Parameters:
        newRealLayerName - the new layer name
      • run

        public void run()
        Thread entry function for layer work.
        Specified by:
        run in interface java.lang.Runnable