public interface IConnection extends ICoreObject, ICastingAttributeStore
| Modifier and Type | Interface and Description |
|---|---|
static class |
IConnection.Duty
Duty type.
|
static class |
IConnection.Encoding
Encoding type.
|
static class |
IConnection.Type
Connection type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IConnectionListener listener)
Adds a listener to this object
|
void |
close()
Close this connection.
|
boolean |
connect(IScope scope)
Try to connect to the scope.
|
boolean |
connect(IScope scope,
Object[] params)
Try to connect to the scope with a list of connection parameters.
|
Iterator<IBasicScope> |
getBasicScopes()
Get the basic scopes this connection has subscribed.
|
IClient |
getClient()
Get the client object associated with this connection.
|
long |
getClientBytesRead()
Return number of written bytes the client reports to have received.
|
Map<String,Object> |
getConnectParams()
Return the parameters that were given in the call to "connect".
|
long |
getDroppedMessages()
Total number of messages that have been dropped.
|
IConnection.Duty |
getDuty()
Get the duty for this connection; this is not meant nor expected to remain static.
|
IConnection.Encoding |
getEncoding()
Get the object encoding in use for this connection.
|
String |
getHost()
Get the hostname that the client is connected to.
|
int |
getLastPingTime()
Return round-trip time of last ping command.
|
String |
getPath()
Get the path for this connection.
|
long |
getPendingMessages()
Total number of messages that are pending to be sent to the connection.
|
String |
getProtocol()
Returns the protocol type for this connection.
|
long |
getReadBytes()
Total number of bytes read from the connection.
|
long |
getReadMessages()
Total number of messages read from the connection.
|
String |
getRemoteAddress()
Get the IP address the client is connected from.
|
List<String> |
getRemoteAddresses()
Get the IP addresses the client is connected from.
|
int |
getRemotePort()
Get the port the client is connected from.
|
IScope |
getScope()
Get the scope this is connected to.
|
String |
getSessionId()
Get the session id, this may be null.
|
Number |
getStreamId()
Returns the current stream id.
|
String |
getType()
Deprecated.
|
long |
getWrittenBytes()
Total number of bytes written to the connection.
|
long |
getWrittenMessages()
Total number of messages written to the connection.
|
void |
initialize(IClient client)
Initialize the connection.
|
boolean |
isConnected()
Is the client connected to the scope.
|
void |
ping()
Start measuring the round-trip time for a packet on the connection.
|
void |
removeListener(IConnectionListener listener)
Removes the listener from this object
|
void |
setBandwidth(int mbits)
Sets the bandwidth using a mbit/s value.
|
void |
setClient(IClient client)
Sets the Client.
|
void |
setStreamId(Number id)
Sets the current stream id.
|
dispatchEventhandleEventnotifyEventgetBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttributegetAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes, size@Deprecated String getType()
IConnection.Encoding getEncoding()
IConnection.Duty getDuty()
void initialize(IClient client)
client - Client object associated with connectionboolean connect(IScope scope)
scope - Scope objectboolean connect(IScope scope, Object[] params)
params - Connections parametersscope - Scope objectboolean isConnected()
void close()
Map<String,Object> getConnectParams()
void setClient(IClient client)
client - clientIClient getClient()
String getHost()
String getRemoteAddress()
List<String> getRemoteAddresses()
int getRemotePort()
String getPath()
String getSessionId()
long getReadBytes()
long getWrittenBytes()
long getReadMessages()
long getWrittenMessages()
long getDroppedMessages()
long getPendingMessages()
long getClientBytesRead()
BytesReadvoid ping()
int getLastPingTime()
IScope getScope()
Iterator<IBasicScope> getBasicScopes()
void setBandwidth(int mbits)
mbits - targetvoid addListener(IConnectionListener listener)
listener - connection listenervoid removeListener(IConnectionListener listener)
listener - connection listenerNumber getStreamId()
void setStreamId(Number id)
id - stream idString getProtocol()
Copyright © 2005–2017 Red5. All rights reserved.