Class Script

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Script
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A wrapper for a Script object for GenericBaseCommands#invokeScript(Script) As long as this object is not closed, the script's code is saved in memory, and can be resent to the server. Script should be enclosed with a try-with-resource block or close() must be called to invalidate the code hash.
    • Constructor Summary

      Constructors 
      Constructor Description
      Script​(T code, java.lang.Boolean binaryOutput)
      Wraps around creating a Script object from code.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Drop the linked script from glide-rs code.
      java.lang.Boolean getBinaryOutput()
      Indication if script invocation output can return binary data.
      java.lang.String getHash()
      Hash string representing the code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Script

        public Script​(T code,
                      java.lang.Boolean binaryOutput)
        Wraps around creating a Script object from code.
        Parameters:
        code - To execute with a ScriptInvoke call.
        binaryOutput - Indicates if the output can return binary data.
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Drop the linked script from glide-rs code.
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • getHash

        public java.lang.String getHash()
        Hash string representing the code.
      • getBinaryOutput

        public java.lang.Boolean getBinaryOutput()
        Indication if script invocation output can return binary data.