Class LoadJavascriptMessage

java.lang.Object
com.jbstrap.core.websocket.messages.BaseMessage
com.jbstrap.core.websocket.messages.LoadJavascriptMessage
All Implemented Interfaces:
MessageWithReturnValue

public class LoadJavascriptMessage extends BaseMessage implements MessageWithReturnValue
Since:
4.0
Author:
JBStrap
  • Constructor Details

    • LoadJavascriptMessage

      public LoadJavascriptMessage()
      Creates a JavaScript load message
  • Method Details

    • addFile

      public LoadJavascriptMessage addFile(String filename)
      Adds the specified file to the message
      Parameters:
      filename - The URL of the file
      Returns:
      The JavaScript load message
    • isEmpty

      public boolean isEmpty()
      Determines if the message is empty. A message is considered empty if it has no files added to it.
      Returns:
      true, if empty, otherwise false
    • setTimeout

      public LoadJavascriptMessage setTimeout(long timeout)
      Sets the timeout for the reply message.
      Parameters:
      timeout - The amount of time for waiting for the reply
      Returns:
      The JavaScript load message
    • getTimeout

      public long getTimeout()
      Gets the timeout amount
      Returns:
      The timeout amount