Annotation Interface CometCScriptFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe enum Call style.static enumThe enum Error reporting.static enumThe enum Mode. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionGets the alternative name of the cscript function.Call style call style.Error reporting method for this cscript function.Value to indicate failures for FUNCTION style methods.Mode mode.Gets the name of this cscript function.intPolling int.Gets the name of the python function.Short description of the method resultlongTimeout long. -
Field Summary
Fields
-
Field Details
-
ADAPTIVE
static final int ADAPTIVEThe constant ADAPTIVE.- See Also:
-
INFINITE
static final long INFINITEThe constant INFINITE.- See Also:
-
-
Element Details
-
name
String nameGets the name of this cscript function.
This name must be a valid cscript function identifier, furthermore it must be unique within the Java Plugin providing this cscript function.
If the name attribute is omitted, the native Java method name will be used for the cscript stub.
cscript function names can include the colon ':' character, thus naming can follow a namespace like schema.
- Returns:
- the name of this cscript function. This name must be a valid cscript identifier, furthermore it must be unique within the Java Plugin providing this cscript function.
- Default:
- ""
-
pythonName
String pythonNameGets the name of the python function.
This name must be a valid python identifier.
If the attribute is omitted, the native Java method name will be used for the python stub.
- Returns:
- name of the python function
- Default:
- ""
-
alias
String aliasGets the alternative name of the cscript function.
This attribute was introduced to allow renaming of functions according to new naming conventions, e.g. including a namespace.
If the attribute is defined / non empty, the cscript function will be available on client side by name (or native Java method name) and alias
- Returns:
- alternative name of the cscript function
- Default:
- ""
-
callStyle
CometCScriptFunction.CallStyle callStyleCall style call style.- Returns:
- callStyle of this function. See the CallStyle enum documentation for more information.
- Default:
- FUNCTION
-
failureValue
String failureValueValue to indicate failures for FUNCTION style methods.
The value to indicate failure for FUNCTION style methods.
This could be an empty String (for functions with String return type) or "-1" for functions, which actually should return a valid Integer ID (which is never negative) or "0.0" for functions, which should return a valid Double dimension (which should never be zero) etc.If this attribute is omitted, a zero equivalent value will be used as the failure indicator value.
- Returns:
- the failure value for this method, if we use FUNCTION style
- Default:
- ""
-
resultDescription
String resultDescriptionShort description of the method result
This is for documentation purposes only.
The result description is included in inline documentation of generated cscript headers.- Returns:
- a short description of the method result
- Default:
- ""
-
errorReporting
CometCScriptFunction.ErrorReporting errorReportingError reporting method for this cscript function.
Regardless of the error reporting, error handling is subject to the cscript developer, which calls the Java method exposed as a cscript function.
Error reporting only controls, if and how errors caused by exception thrown from the underlying Java methods are reported to the user.
Options are:- USER: error reporting is subject to the user, i.e. cscript developer. If log is enabled on client side, messages will be written to the log file.
- ALERT: an alert dialog is opened showing the exception message as thrown from the underlying Java method
- LOCALIZED: an alert dialog is opened showing the translated exception message as thrown from the underlying Java method
- Returns:
- method for error reporting
- Default:
- USER
-
mode
Mode mode.- Returns:
- mode
- Default:
- SYNCHRONOUS
-
polling
int pollingPolling int.- Returns:
- int
- Default:
- -1
-
timeout
long timeoutTimeout long.- Returns:
- long
- Default:
- -1L
-