Class WriteSocket


  • public class WriteSocket
    extends AbstractSocket
    Action performed when writing on a socket.
    • Constructor Detail

      • WriteSocket

        public WriteSocket​(Socket socket,
                           int nbBytes)
        Creates a write socket action.
        Parameters:
        socket - the socket of the write action.
        nbBytes - the number of written bytes.
    • Method Detail

      • getNbBytes

        public int getNbBytes()
        Gets the number of bytes to be written.
        Returns:
        the number of bytes to be written.
      • onStart

        public void onStart()
                     throws SecurityException
        Called when the execution of the action is about to start. This hook is used to check if the action is allowed to be performed.
        Throws:
        SecurityException - if the action is not allowed to be performed.
      • onEnd

        public void onEnd​(boolean endWithSuccess)
        Called when the execution of the action is finished. This hook is used to update the current resources state of the module that performs the action.
        Parameters:
        endWithSuccess - true if the execution of the action was ended with success; false otherwise.