Class ClientDynamicDispatchFunction

java.lang.Object
com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction
All Implemented Interfaces:
Function

public class ClientDynamicDispatchFunction extends Object implements Function
In the client, functions are serialized into the bindings. If a function is provided by a module, and then the module is uninstalled, the windows or objects that use that function would be unable to deserialize. This class is used instead to store function references to module provided functions. It retrieves the actual function as necessary from the function factory, retrieved through the context provided in connect.
  • Constructor Details

    • ClientDynamicDispatchFunction

      public ClientDynamicDispatchFunction()
    • ClientDynamicDispatchFunction

      public ClientDynamicDispatchFunction(String name, Function func)
  • Method Details

    • getFunctionName

      public String getFunctionName()
    • setFunctionName

      public void setFunctionName(String functionName)
    • execute

      public QualifiedValue execute(Expression[] args) throws ExpressionException
      Description copied from interface: Function
      Execute this function, and return the function's qualified value.
      Specified by:
      execute in interface Function
      Throws:
      ExpressionException
    • initArgs

      public void initArgs(Expression[] args)
      Description copied from interface: Function
      Initialize this function with the given arguments.
      Specified by:
      initArgs in interface Function
    • getType

      public Class<?> getType()
      Description copied from interface: Function
      Returns the type that this function will return upon execution
      Specified by:
      getType in interface Function
    • getArgDocString

      public String getArgDocString()
      Description copied from interface: Function
      Returns a string to be used in the auto-generated function documentation. The string should represent the arguments for the function, such as "string, count" for the "repeat" function.
      Specified by:
      getArgDocString in interface Function
    • copy

      public Function copy()
      Description copied from interface: Function
      Creates a copy of this function. Each FunctionExpression will always retrieve a copy of the function that it wants. It is up to the function whether or not a true copy is retrieved, or simply a reference to the main function object. If the function stores transient data during serialization, and thus cannot be shared between expressions, a copy must be made.
      Specified by:
      copy in interface Function
    • connect

      public void connect(CommonContext context, InteractionListener updateListener)
      Description copied from interface: Function
      Gives the function a chance to connect itself to things, if necessary. Most functions do not have any connections. A function should notify the updateListener if they change. The implementation of InteractionListener should execute as quickly as possible, and should not block.
      Specified by:
      connect in interface Function
    • disconnect

      public void disconnect()
      Description copied from interface: Function
      Tells the function to disconnect from anything it was connected to.
      Specified by:
      disconnect in interface Function
    • startup

      public void startup()
      Description copied from interface: Function
      Tells the function to startup any polling operations. Functions that use this can remember the updateListener from connect() to feed update notification to.
      Specified by:
      startup in interface Function
    • shutdown

      public void shutdown()
      Description copied from interface: Function
      Tells the function to shutdown any polling operations.
      Specified by:
      shutdown in interface Function