Package com.wowza.wms.websocket.model
Interface IWebSocketSession
- 
 public interface IWebSocketSession
- 
- 
Field Summary
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose(boolean immediately, int reasonCode, String reasonStr)Close the WebSocket sessionStringgetContextStr()Get context string for loggingElapsedTimergetElapsedTime()Get the time the WebSocket session has been aliveIWebSocketEventNotifygetEventListener()Get the listener object that receives WebSockets eventsjava.util.Map<String,String>getHeaderMap()Get map of HTTP headers from original upgrade HTTP requestIHTTPProvidergetHTTPProvider()Get the HTTPProvider that is the parent of this WebSocket sessioncom.wowza.wms.http.HTTPRequestgetHTTPRequest()Get HTTPRequest objectintgetIdleFrequency()Get time in milliseconds between idle eventsIOPerformanceCountergetIOPerformanceCounter()Get IO performance counter that tracks incoming and outgoing TCP trafficorg.apache.mina.common.IoSessiongetIoSession()Get the low level IOSession for this websocketObjectgetLock()Get the internal synchronization lock for this sessionlonggetMaximumMessageSize()Get the maximum WebSocket message size for a single message (0 = no limit)intgetMaximumPendingWriteBytes()Get the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)longgetPacketFragmentationSize()Not being used currentlyjava.util.Map<String,java.util.List<String>>getParameterMap()Get map of HTTP parameters from original upgrade HTTP requestintgetPingTimeout()Get the timeout (milliseconds) that we wait for a response (pong) to a ping messageWMSPropertiesgetProperties()Get user propertiesStringgetQueryString()Get query string from original upgrade HTTP requestStringgetRemoteHost()Get remote hostStringgetRemoteIpAddress()Get the remote Ip addressStringgetRequestedDomainName()StringgetReqURI()Get request URI from original upgrade HTTP requestStringgetReqURL()Get request URL from original upgrade HTTP requestintgetSessionId()Get WebSocket session IdintgetValidationFrequency()Get time in milliseconds between validation messages (ping from server to client).booleanisActive()True if WebSocket session is still active, false if close has been called but session is still connected (waiting to close)booleanisMaskOutgoingMessages()Should outgoing messages be masked (many browsers do not support masked outgoing messages)voidping(IWebSocketPingResult pingResult)Send a ping message from server to clientvoidsendMessage(WebSocketMessage message)Send a WebSocket message from server to clientvoidsetHTTPRequest(com.wowza.wms.http.HTTPRequest httpRequest)Set HTTPRequest objectvoidsetIdleFrequency(int idleFrequency)Set time in milliseconds between idle eventsvoidsetMaskOutgoingMessages(boolean maskOutgoingMessages)Should outgoing messages be masked (many browsers do not support masked outgoing messages)voidsetMaximumMessageSize(long maxMessageSize)Set the maximum WebSocket message size for a single message (0 = no limit)voidsetMaximumPendingWriteBytes(int maximumPendingWriteBytes)Set the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)voidsetPacketFragmentationSize(long packetFragmentationSize)Not being used currentlyvoidsetPingTimeout(int pingTimeout)Set the timeout (milliseconds) that we wait for a response (pong) to a ping messagevoidsetRemoteHost(String remoteHost)Set remote hostvoidsetRemoteIpAddress(String remoteIpAddress)Set remote Ip addressvoidsetValidationFrequency(int validationFrequency)Set time in milliseconds between validation messages (ping from server to client).
 
- 
- 
- 
Field Detail- 
SECURITY_GUIDstatic final String SECURITY_GUID - See Also:
- Constant Field Values
 
 - 
SECURITY_DIGEST_ALGORITHMstatic final String SECURITY_DIGEST_ALGORITHM - See Also:
- Constant Field Values
 
 - 
CHARENCODINGstatic final String CHARENCODING - See Also:
- Constant Field Values
 
 - 
PINGWOWZAIDstatic final int PINGWOWZAID - See Also:
- Constant Field Values
 
 - 
CLOSETIMEOUTstatic final int CLOSETIMEOUT - See Also:
- Constant Field Values
 
 - 
HTTPHEADER_NAMEstatic final String HTTPHEADER_NAME - See Also:
- Constant Field Values
 
 - 
HTTPHEADER_SECKEYstatic final String HTTPHEADER_SECKEY - See Also:
- Constant Field Values
 
 - 
HTTPHEADER_SECACCEPTstatic final String HTTPHEADER_SECACCEPT - See Also:
- Constant Field Values
 
 - 
CLOSECODE_NORMALstatic final int CLOSECODE_NORMAL - See Also:
- Constant Field Values
 
 - 
CLOSESTR_NORMALstatic final String CLOSESTR_NORMAL - See Also:
- Constant Field Values
 
 - 
CLOSECODE_GOINGAWAYstatic final int CLOSECODE_GOINGAWAY - See Also:
- Constant Field Values
 
 - 
CLOSESTR_GOINGAWAYstatic final String CLOSESTR_GOINGAWAY - See Also:
- Constant Field Values
 
 - 
CLOSECODE_PROTOCOLERRORstatic final int CLOSECODE_PROTOCOLERROR - See Also:
- Constant Field Values
 
 - 
CLOSESTR_PROTOCOLERRORstatic final String CLOSESTR_PROTOCOLERROR - See Also:
- Constant Field Values
 
 - 
CLOSECODE_UNSUPPORTEDDATAstatic final int CLOSECODE_UNSUPPORTEDDATA - See Also:
- Constant Field Values
 
 - 
CLOSESTR_UNSUPPORTEDDATAstatic final String CLOSESTR_UNSUPPORTEDDATA - See Also:
- Constant Field Values
 
 - 
CLOSECODE_RESERVEDstatic final int CLOSECODE_RESERVED - See Also:
- Constant Field Values
 
 - 
CLOSESTR_RESERVEDstatic final String CLOSESTR_RESERVED - See Also:
- Constant Field Values
 
 - 
CLOSECODE_NOSTATUSRECEIVEDstatic final int CLOSECODE_NOSTATUSRECEIVED - See Also:
- Constant Field Values
 
 - 
CLOSESTR_NOSTATUSRECEIVEDstatic final String CLOSESTR_NOSTATUSRECEIVED - See Also:
- Constant Field Values
 
 - 
CLOSECODE_ABNORMALstatic final int CLOSECODE_ABNORMAL - See Also:
- Constant Field Values
 
 - 
CLOSESTR_ABNORMALstatic final String CLOSESTR_ABNORMAL - See Also:
- Constant Field Values
 
 - 
CLOSECODE_INVALIDFRAMEstatic final int CLOSECODE_INVALIDFRAME - See Also:
- Constant Field Values
 
 - 
CLOSESTR_INVALIDFRAMEstatic final String CLOSESTR_INVALIDFRAME - See Also:
- Constant Field Values
 
 - 
CLOSECODE_POLICYVIOLATIONstatic final int CLOSECODE_POLICYVIOLATION - See Also:
- Constant Field Values
 
 - 
CLOSESTR_POLICYVIOLATIONstatic final String CLOSESTR_POLICYVIOLATION - See Also:
- Constant Field Values
 
 - 
CLOSECODE_MESSAGETOOBIGstatic final int CLOSECODE_MESSAGETOOBIG - See Also:
- Constant Field Values
 
 - 
CLOSESTR_MESSAGETOOBIGstatic final String CLOSESTR_MESSAGETOOBIG - See Also:
- Constant Field Values
 
 - 
CLOSECODE_MANDATORYEXTstatic final int CLOSECODE_MANDATORYEXT - See Also:
- Constant Field Values
 
 - 
CLOSESTR_MANDATORYEXTstatic final String CLOSESTR_MANDATORYEXT - See Also:
- Constant Field Values
 
 - 
CLOSECODE_INTERNALSERVERstatic final int CLOSECODE_INTERNALSERVER - See Also:
- Constant Field Values
 
 - 
CLOSESTR_INTERNALSERVERstatic final String CLOSESTR_INTERNALSERVER - See Also:
- Constant Field Values
 
 - 
CLOSECODE_TLSHANDSHAKEstatic final int CLOSECODE_TLSHANDSHAKE - See Also:
- Constant Field Values
 
 - 
CLOSESTR_TLSHANDSHAKEstatic final String CLOSESTR_TLSHANDSHAKE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getContextStrString getContextStr() Get context string for logging- Returns:
- context string for logging
 
 - 
closevoid close(boolean immediately, int reasonCode, String reasonStr)Close the WebSocket session- Parameters:
- immediately- if true, session will be terminated immediately by closing TCP connection, if false close command will be sent
- reasonCode- reason for close, see CLOSECODE_*
- reasonStr- reason string for close, see CLOSESTR_*
 
 - 
getHeaderMapjava.util.Map<String,String> getHeaderMap() Get map of HTTP headers from original upgrade HTTP request- Returns:
- HTTP headers
 
 - 
getParameterMapjava.util.Map<String,java.util.List<String>> getParameterMap() Get map of HTTP parameters from original upgrade HTTP request- Returns:
- HTTP parameters
 
 - 
getQueryStringString getQueryString() Get query string from original upgrade HTTP request- Returns:
- query string
 
 - 
getReqURIString getReqURI() Get request URI from original upgrade HTTP request- Returns:
- request URI
 
 - 
getReqURLString getReqURL() Get request URL from original upgrade HTTP request- Returns:
- request URL
 
 - 
getMaximumMessageSizelong getMaximumMessageSize() Get the maximum WebSocket message size for a single message (0 = no limit)- Returns:
- maximum WebSocket message size
 
 - 
setMaximumMessageSizevoid setMaximumMessageSize(long maxMessageSize) Set the maximum WebSocket message size for a single message (0 = no limit)- Parameters:
- maxMessageSize- maximum WebSocket message size
 
 - 
isMaskOutgoingMessagesboolean isMaskOutgoingMessages() Should outgoing messages be masked (many browsers do not support masked outgoing messages)- Returns:
- true, if messages are masked
 
 - 
setMaskOutgoingMessagesvoid setMaskOutgoingMessages(boolean maskOutgoingMessages) Should outgoing messages be masked (many browsers do not support masked outgoing messages)- Parameters:
- maskOutgoingMessages- true, if messages are masked
 
 - 
isActiveboolean isActive() True if WebSocket session is still active, false if close has been called but session is still connected (waiting to close)- Returns:
- true if WebSocket session is still active
 
 - 
getPacketFragmentationSizelong getPacketFragmentationSize() Not being used currently- Returns:
- not being used
 
 - 
setPacketFragmentationSizevoid setPacketFragmentationSize(long packetFragmentationSize) Not being used currently- Parameters:
- packetFragmentationSize- not being used
 
 - 
getIdleFrequencyint getIdleFrequency() Get time in milliseconds between idle events- Returns:
- idle time (milliseconds)
 
 - 
setIdleFrequencyvoid setIdleFrequency(int idleFrequency) Set time in milliseconds between idle events- Parameters:
- idleFrequency- idle time (milliseconds)
 
 - 
sendMessagevoid sendMessage(WebSocketMessage message) Send a WebSocket message from server to client- Parameters:
- message- WebSocket message
 
 - 
getValidationFrequencyint getValidationFrequency() Get time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.- Returns:
- validation time (milliseconds)
 
 - 
setValidationFrequencyvoid setValidationFrequency(int validationFrequency) Set time in milliseconds between validation messages (ping from server to client). Value of zero turns off validation.- Parameters:
- validationFrequency- validation time (milliseconds)
 
 - 
getMaximumPendingWriteBytesint getMaximumPendingWriteBytes() Get the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)- Returns:
- number of bytes that can be pending waiting
 
 - 
setMaximumPendingWriteBytesvoid setMaximumPendingWriteBytes(int maximumPendingWriteBytes) Set the number of bytes that can be pending waiting to be sent before messages are no longer send (0 turns off this feature)- Parameters:
- maximumPendingWriteBytes- number of bytes that can be pending waiting
 
 - 
pingvoid ping(IWebSocketPingResult pingResult) Send a ping message from server to client- Parameters:
- pingResult- callback object when pong messages is received or ping message timesout
 
 - 
getLockObject getLock() Get the internal synchronization lock for this session- Returns:
- internal synchronization lock
 
 - 
getEventListenerIWebSocketEventNotify getEventListener() Get the listener object that receives WebSockets events- Returns:
- listener object
 
 - 
getSessionIdint getSessionId() Get WebSocket session Id- Returns:
- WebSocket session Id
 
 - 
getHTTPProviderIHTTPProvider getHTTPProvider() Get the HTTPProvider that is the parent of this WebSocket session- Returns:
- HTTPProvider
 
 - 
getIOPerformanceCounterIOPerformanceCounter getIOPerformanceCounter() Get IO performance counter that tracks incoming and outgoing TCP traffic- Returns:
- IO performance counter
 
 - 
getElapsedTimeElapsedTimer getElapsedTime() Get the time the WebSocket session has been alive- Returns:
- time the WebSocket session has been alive
 
 - 
getPingTimeoutint getPingTimeout() Get the timeout (milliseconds) that we wait for a response (pong) to a ping message- Returns:
- timeout (milliseconds)
 
 - 
setPingTimeoutvoid setPingTimeout(int pingTimeout) Set the timeout (milliseconds) that we wait for a response (pong) to a ping message- Parameters:
- pingTimeout- timeout (milliseconds)
 
 - 
getPropertiesWMSProperties getProperties() Get user properties- Returns:
- user properties
 
 - 
getRemoteIpAddressString getRemoteIpAddress() Get the remote Ip address- Returns:
- remote Ip address
 
 - 
setRemoteIpAddressvoid setRemoteIpAddress(String remoteIpAddress) Set remote Ip address- Parameters:
- remoteIpAddress- remote Ip address
 
 - 
setHTTPRequestvoid setHTTPRequest(com.wowza.wms.http.HTTPRequest httpRequest) Set HTTPRequest object- Parameters:
- HTTPRequest-
 
 - 
getHTTPRequestcom.wowza.wms.http.HTTPRequest getHTTPRequest() Get HTTPRequest object- Returns:
 
 - 
getRemoteHostString getRemoteHost() Get remote host- Returns:
- remote host
 
 - 
setRemoteHostvoid setRemoteHost(String remoteHost) Set remote host- Parameters:
- remoteHost- remote host
 
 - 
getIoSessionorg.apache.mina.common.IoSession getIoSession() Get the low level IOSession for this websocket- Returns:
- low level IOSession
 
 - 
getRequestedDomainNameString getRequestedDomainName() 
 
- 
 
-