Class ConnectionCounter
- Object
- 
- com.wowza.wms.client.ConnectionCounterBase
- 
- com.wowza.wms.client.ConnectionCounter
 
 
- 
 public class ConnectionCounter extends com.wowza.wms.client.ConnectionCounterBase
- 
- 
Constructor SummaryConstructors Constructor Description ConnectionCounter()Create empty ConnectionCounter
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Accept a new connection.voidaddConnectionListener(IConnectionNotify connectionNotify)Add a connection listener.voiddecrement(com.wowza.wms.client.ConnectionHolder connectionHolder, boolean isValid, java.util.Date date, long stamp, byte[] license)Decrement connection counters.voiddisconnect(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Disconnect connection.longgetCurrent()Get total number of client currently conencted to this object.longgetLastConnectAcceptedStamp()Get time (milliseconds) of the last conenction to this object.StringgetLastConnectAcceptedStampString()Get time (milliseconds) of the last conenction to this object as formatted string.java.util.DategetLastConnectAcceptedTime()Get time (milliseconds) of the last accepeted conenction to this object.StringgetLastConnectAcceptedTimeString()Get time (milliseconds) of the last accepeted conenction to this object as formatted string.longgetLastConnectRejectedByReasonStamp(int reason)Get time (milliseconds) of the last rejected conenction by reason to this object.StringgetLastConnectRejectedByReasonStampString(int reason)Get time (milliseconds) of the last rejected conenction by reason to this object as formatted string.java.util.DategetLastConnectRejectedByReasonTime(int reason)Get date and time of last rejected connection by reason to this object as Date object.StringgetLastConnectRejectedByReasonTimeString(int reason)Get date and time of last rejected connection by reason to this object as formated string.longgetLastConnectRejectedStamp()Get time (milliseconds) of the last rejected conenction to this object.StringgetLastConnectRejectedStampString()Get time (milliseconds) of the last rejected conenction to this object as formatted string.java.util.DategetLastConnectRejectedTime()Get date and time of last rejected connection to this object as Date object.StringgetLastConnectRejectedTimeString()Get date and time of last rejected connection to this object as formated string.longgetLastDisconnectStamp()Get time (milliseconds) of the last disconnected conenction to this object.StringgetLastDisconnectStampString()Get time (milliseconds) of the last disconnected conenction to this object as formatted string.java.util.DategetLastDisconnectTime()Get date and time of last disconnected connection to this object as Date object.StringgetLastDisconnectTimeString()Get date and time of last disconnected connection to this object as Date object as formatted string.longgetTotal()Get total number of connection attempts to this object.longgetTotalAccepted()Get total number of accepted connections to this object.longgetTotalRejected()Get total number of rejected connections to this object.voidincrementAccept(com.wowza.wms.client.ConnectionHolder connectionHolder, java.util.Date date, long stamp, byte[] license)Increment accepted connections.voidincrementReject(com.wowza.wms.client.ConnectionHolder connectionHolder, int reason, java.util.Date date, long stamp, byte[] license)Increment reject connection.voidrejectConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, int reason, byte[] license)Reject connection.voidremoveConnectionListener(IConnectionNotify connectionNotify)Remove connection listenervoidsetConnectionValidator(com.wowza.wms.client.IConnectionValidator connectionValidator)Set the connection validator.booleanvalidateNewConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Validate a new connection.
 
- 
- 
- 
Method Detail- 
addConnectionListenerpublic void addConnectionListener(IConnectionNotify connectionNotify) Add a connection listener. Receives following events: onClientConnect, onClientDisconnect, onClientAccept and onClientReject.- Parameters:
- connectionNotify- connection listener
 
 - 
removeConnectionListenerpublic void removeConnectionListener(IConnectionNotify connectionNotify) Remove connection listener- Parameters:
- connectionNotify- connection listener
 
 - 
setConnectionValidatorpublic void setConnectionValidator(com.wowza.wms.client.IConnectionValidator connectionValidator) Set the connection validator.- Parameters:
- connectionValidator- connection validator
 
 - 
validateNewConnectionpublic boolean validateNewConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Validate a new connection.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- license- security data
- Returns:
- true if connection is accepted
 
 - 
acceptConnectionpublic void acceptConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Accept a new connection.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- license- security data
 
 - 
incrementAcceptpublic void incrementAccept(com.wowza.wms.client.ConnectionHolder connectionHolder, java.util.Date date, long stamp, byte[] license)Increment accepted connections.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- date- date the connection occured
- stamp- time stamp connection occured (milliseconds)
- license- security data
 
 - 
rejectConnectionpublic void rejectConnection(com.wowza.wms.client.ConnectionHolder connectionHolder, int reason, byte[] license)Reject connection.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- reason- reason the connection was refused. See REJECTREASON_*
- license- security data
 
 - 
incrementRejectpublic void incrementReject(com.wowza.wms.client.ConnectionHolder connectionHolder, int reason, java.util.Date date, long stamp, byte[] license)Increment reject connection.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- reason- reason the connection was refused. See REJECTREASON_*
- date- date the connection occured
- stamp- time stamp connection occured (milliseconds)
- license- security data
 
 - 
disconnectpublic void disconnect(com.wowza.wms.client.ConnectionHolder connectionHolder, byte[] license)Disconnect connection.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- license- security data
 
 - 
decrementpublic void decrement(com.wowza.wms.client.ConnectionHolder connectionHolder, boolean isValid, java.util.Date date, long stamp, byte[] license)Decrement connection counters.NOTE: This is a private internal call. Server will not work properly if this method is not called properly using internal security mechanism. - Parameters:
- connectionHolder- connection holder
- isValid- is a valid connection
- date- date the connection occured
- stamp- time stamp connection occured (milliseconds)
- license- security data
 
 - 
getCurrentpublic long getCurrent() Get total number of client currently conencted to this object.- Returns:
- total number of client currently conencted to this object
 
 - 
getLastConnectAcceptedStamppublic long getLastConnectAcceptedStamp() Get time (milliseconds) of the last conenction to this object.- Returns:
- time (milliseconds) of the last conenction to this object
 
 - 
getLastConnectAcceptedStampStringpublic String getLastConnectAcceptedStampString() Get time (milliseconds) of the last conenction to this object as formatted string.- Returns:
- time (milliseconds) of the last conenction to this object as formatted string
 
 - 
getLastConnectAcceptedTimepublic java.util.Date getLastConnectAcceptedTime() Get time (milliseconds) of the last accepeted conenction to this object.- Returns:
- time (milliseconds) of the last accepeted conenction to this object
 
 - 
getLastConnectAcceptedTimeStringpublic String getLastConnectAcceptedTimeString() Get time (milliseconds) of the last accepeted conenction to this object as formatted string.- Returns:
- time (milliseconds) of the last accepeted conenction to this object as formatted string
 
 - 
getLastConnectRejectedStamppublic long getLastConnectRejectedStamp() Get time (milliseconds) of the last rejected conenction to this object.- Returns:
- time (milliseconds) of the last rejected conenction to this object
 
 - 
getLastConnectRejectedStampStringpublic String getLastConnectRejectedStampString() Get time (milliseconds) of the last rejected conenction to this object as formatted string.- Returns:
- time (milliseconds) of the last rejected conenction to this object as formatted string
 
 - 
getLastConnectRejectedTimepublic java.util.Date getLastConnectRejectedTime() Get date and time of last rejected connection to this object as Date object.- Returns:
- date and time of last reject connection to this object as Date object
 
 - 
getLastConnectRejectedTimeStringpublic String getLastConnectRejectedTimeString() Get date and time of last rejected connection to this object as formated string.- Returns:
- date and time of last reject connection to this object as formated string
 
 - 
getLastConnectRejectedByReasonStampStringpublic String getLastConnectRejectedByReasonStampString(int reason) Get time (milliseconds) of the last rejected conenction by reason to this object as formatted string.- Parameters:
- reason- reason, see REJECTREASON_*
- Returns:
- time (milliseconds) of the last rejected conenction by reason to this object as formatted string
 
 - 
getLastConnectRejectedByReasonStamppublic long getLastConnectRejectedByReasonStamp(int reason) Get time (milliseconds) of the last rejected conenction by reason to this object.- Parameters:
- reason- reason, see REJECTREASON_*
- Returns:
- time (milliseconds) of the last rejected conenction by reason to this object
 
 - 
getLastConnectRejectedByReasonTimepublic java.util.Date getLastConnectRejectedByReasonTime(int reason) Get date and time of last rejected connection by reason to this object as Date object.- Parameters:
- reason- reason, see REJECTREASON_*
- Returns:
- date and time of last reject connection by reason to this object as Date object
 
 - 
getLastConnectRejectedByReasonTimeStringpublic String getLastConnectRejectedByReasonTimeString(int reason) Get date and time of last rejected connection by reason to this object as formated string.- Parameters:
- reason- reason, see REJECTREASON_*
- Returns:
- date and time of last rejected connection by reason to this object as formated string
 
 - 
getLastDisconnectStampStringpublic String getLastDisconnectStampString() Get time (milliseconds) of the last disconnected conenction to this object as formatted string.- Returns:
- time (milliseconds) of the last disconnected conenction to this object as formatted string
 
 - 
getLastDisconnectStamppublic long getLastDisconnectStamp() Get time (milliseconds) of the last disconnected conenction to this object.- Returns:
- time (milliseconds) of the last disconnected conenction to this object
 
 - 
getLastDisconnectTimepublic java.util.Date getLastDisconnectTime() Get date and time of last disconnected connection to this object as Date object.- Returns:
- date and time of last disconnected connection to this object as Date object
 
 - 
getLastDisconnectTimeStringpublic String getLastDisconnectTimeString() Get date and time of last disconnected connection to this object as Date object as formatted string.- Returns:
- date and time of last disconnected connection to this object as Date object as formatted string
 
 - 
getTotalpublic long getTotal() Get total number of connection attempts to this object.- Returns:
- total number of connection attempts to this object
 
 - 
getTotalAcceptedpublic long getTotalAccepted() Get total number of accepted connections to this object.- Returns:
- total number of accepted connections to this object
 
 - 
getTotalRejectedpublic long getTotalRejected() Get total number of rejected connections to this object.- Returns:
- total number of rejected connections to this object
 
 
- 
 
-