Annotation Type CometCScriptFunction
-
@Inherited @Documented @Retention(RUNTIME) @Target(METHOD) public @interface CometCScriptFunctionThe interface Comet C-script function.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringaliasGets the alternative name of the cscript function.CometCScriptFunction.CallStylecallStyleCall style call style.CometCScriptFunction.ErrorReportingerrorReportingError reporting method for this cscript function.java.lang.StringfailureValueValue to indicate failures for FUNCTION style methods.CometCScriptFunction.ModemodeMode mode.java.lang.StringnameGets the name of this cscript function.intpollingPolling int.java.lang.StringpythonNameGets the name of the python function.java.lang.StringresultDescriptionShort description of the method resultlongtimeoutTimeout long.
-
-
-
Element Detail
-
name
java.lang.String name
Gets 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:
- ""
-
-
-
alias
java.lang.String alias
Gets 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 callStyle
Call style call style.- Returns:
- callStyle of this function. See the CallStyle enum documentation for more information.
- Default:
- com.priint.pubserver.comet.bridge.CometCScriptFunction.CallStyle.FUNCTION
-
-
-
failureValue
java.lang.String failureValue
Value 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:
- ""
-
-
-
errorReporting
CometCScriptFunction.ErrorReporting errorReporting
Error 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:
- com.priint.pubserver.comet.bridge.CometCScriptFunction.ErrorReporting.USER
-
-
-
mode
CometCScriptFunction.Mode mode
Mode mode.- Returns:
- mode
- Default:
- com.priint.pubserver.comet.bridge.CometCScriptFunction.Mode.SYNCHRONOUS
-
-