Class WebSocketConnection

java.lang.Object
org.mozilla.javascript.ScriptableObject
org.cometd.javascript.WebSocketConnection
All Implemented Interfaces:
Serializable, org.eclipse.jetty.websocket.api.WebSocketListener, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class WebSocketConnection
extends org.mozilla.javascript.ScriptableObject
implements org.eclipse.jetty.websocket.api.WebSocketListener
See Also:
Serialized Form
  • 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
    WebSocketConnection()  
  • Method Summary

    Modifier and Type Method Description
    String getClassName()  
    void jsConstructor​(Object threadModel, org.mozilla.javascript.Scriptable thiz, Object connector, String url, Object protocol)  
    void jsFunction_close​(int code, String reason)  
    void jsFunction_send​(String data)  
    void onWebSocketBinary​(byte[] payload, int offset, int len)  
    void onWebSocketClose​(int closeCode, String reason)  
    void onWebSocketConnect​(org.eclipse.jetty.websocket.api.Session session)  
    void onWebSocketError​(Throwable x)  
    void onWebSocketText​(String data)  

    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, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class java.lang.Object

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

  • Method Details

    • jsConstructor

      public void jsConstructor​(Object threadModel, org.mozilla.javascript.Scriptable thiz, Object connector, String url, Object protocol)
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface org.mozilla.javascript.Scriptable
      Specified by:
      getClassName in class org.mozilla.javascript.ScriptableObject
    • jsFunction_send

      public void jsFunction_send​(String data) throws IOException
      Throws:
      IOException
    • jsFunction_close

      public void jsFunction_close​(int code, String reason) throws IOException
      Throws:
      IOException
    • onWebSocketConnect

      public void onWebSocketConnect​(org.eclipse.jetty.websocket.api.Session session)
      Specified by:
      onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketBinary

      public void onWebSocketBinary​(byte[] payload, int offset, int len)
      Specified by:
      onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketText

      public void onWebSocketText​(String data)
      Specified by:
      onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketClose

      public void onWebSocketClose​(int closeCode, String reason)
      Specified by:
      onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketError

      public void onWebSocketError​(Throwable x)
      Specified by:
      onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketListener