Class LoadJavascriptMessage
java.lang.Object
com.jbstrap.core.websocket.messages.BaseMessage
com.jbstrap.core.websocket.messages.LoadJavascriptMessage
- All Implemented Interfaces:
MessageWithReturnValue
- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds the specified file to the messagelong
Gets the timeout amountboolean
isEmpty()
Determines if the message is empty.setTimeout
(long timeout) Sets the timeout for the reply message.Methods inherited from class com.jbstrap.core.websocket.messages.BaseMessage
getMessageId, getMessageType
-
Constructor Details
-
LoadJavascriptMessage
public LoadJavascriptMessage()Creates a JavaScript load message
-
-
Method Details
-
addFile
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, otherwisefalse
-
setTimeout
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
-