Class ConnectionWrapper

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.rapidcontext.core.js.ConnectionWrapper
All Implemented Interfaces:
Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable, org.mozilla.javascript.Wrapper

public final class ConnectionWrapper extends org.mozilla.javascript.ScriptableObject implements org.mozilla.javascript.Wrapper
A JavaScript connection wrapper. This class encapsulates a connection channel and forwards calls to the Java methods.
Version:
1.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

    org.mozilla.javascript.ScriptableObject.KeyComparator
  • Field Summary

    Fields inherited from class org.mozilla.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from interface org.mozilla.javascript.Scriptable

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConnectionWrapper(CallContext cx, Channel channel, org.mozilla.javascript.Scriptable parentScope)
    Creates a new JavaScript connection wrapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String name, org.mozilla.javascript.Scriptable start)
    Returns a named property from this object.
    Returns the class name.
    Returns the encapsulated adapter connection.
    boolean
    hasInstance(org.mozilla.javascript.Scriptable instance)
    Checks for JavaScript instance objects (always returns false).
    Returns the wrapped object.

    Methods inherited from class org.mozilla.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class java.lang.Object

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

    • ConnectionWrapper

      public ConnectionWrapper(CallContext cx, Channel channel, org.mozilla.javascript.Scriptable parentScope)
      Creates a new JavaScript connection wrapper.
      Parameters:
      cx - the procedure call context
      channel - the connection channel
      parentScope - the object parent scope
  • Method Details

    • getConnection

      public Channel getConnection()
      Returns the encapsulated adapter connection.
      Returns:
      the encapsulated adapter connection
    • getClassName

      public String getClassName()
      Returns the class name.
      Specified by:
      getClassName in interface org.mozilla.javascript.Scriptable
      Specified by:
      getClassName in class org.mozilla.javascript.ScriptableObject
      Returns:
      the class name
    • hasInstance

      public boolean hasInstance(org.mozilla.javascript.Scriptable instance)
      Checks for JavaScript instance objects (always returns false).
      Specified by:
      hasInstance in interface org.mozilla.javascript.Scriptable
      Overrides:
      hasInstance in class org.mozilla.javascript.ScriptableObject
      Parameters:
      instance - the object to check
      Returns:
      always returns false (no instances possible)
    • get

      public Object get(String name, org.mozilla.javascript.Scriptable start)
      Returns a named property from this object.
      Specified by:
      get in interface org.mozilla.javascript.Scriptable
      Overrides:
      get in class org.mozilla.javascript.ScriptableObject
      Parameters:
      name - the name of the property
      start - the object in which the lookup began
      Returns:
      the value of the property, or NOT_FOUND if not found
    • unwrap

      public Object unwrap()
      Returns the wrapped object.
      Specified by:
      unwrap in interface org.mozilla.javascript.Wrapper
      Returns:
      the unwrapped object