public interface IClient extends IAttributeStore
IClientRegistry.newClient(Object[])
NOTE: I removed session, since client serves the same purpose as a client with attributes| Modifier and Type | Field and Description |
|---|---|
static String |
ID
The key used to store the client object in a http session.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkBandwidth()
Performs a bandwidth checking routine.
|
Map<String,Object> |
checkBandwidthUp(Object[] params)
Performs a bandwidth checking callback for the client.
|
void |
disconnect()
Closes all the connections.
|
Set<IConnection> |
getConnections()
Get a set of connections.
|
Set<IConnection> |
getConnections(IScope scope)
Get a set of connections of a given scope.
|
long |
getCreationTime()
Get the creation time for this client object.
|
String |
getId()
Get the unique ID for this client.
|
Collection<String> |
getPermissions(IConnection conn)
Return the permissions in a given context.
|
Collection<IScope> |
getScopes()
Get a set of scopes the client is connected to.
|
boolean |
hasPermission(IConnection conn,
String permissionName)
Check if the client has a permission in the given context.
|
boolean |
isBandwidthChecked()
Returns whether or not a bandwidth check has been requested.
|
void |
setPermissions(IConnection conn,
Collection<String> permissions)
Set the permissions for this client in a given context.
|
getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes, sizestatic final String ID
String getId()
paramsobject of
IApplication.appConnect(IConnection, Object[]) method, that contains 2nd all the rest values you pass to
NetConnection.connectmethod.
NetConnection.connect("http://localhost/killerapp/", "user123");
public boolean appConnect(IConnection connection, Object[] params) {
try {
connection.getClient().setAttribute("param0", (String) params[0]);
} catch (Exception e) {
log.error("{}", e);
}
}
long getCreationTime()
Collection<IScope> getScopes()
Set<IConnection> getConnections()
Set<IConnection> getConnections(IScope scope)
scope - scope to get connections forvoid disconnect()
void setPermissions(IConnection conn, Collection<String> permissions)
conn - Connection specifying the context to set the permissions for.permissions - Permissions the client has in this context or
nullfor no permissions.
Collection<String> getPermissions(IConnection conn)
conn - Connection specifying the context to get the permissions for.boolean hasPermission(IConnection conn, String permissionName)
conn - Connection specifying the context to check the permissions forpermissionName - Name of the permission to checktrueif the client has the permission, otherwise
false
void checkBandwidth()
Map<String,Object> checkBandwidthUp(Object[] params)
params - parametersboolean isBandwidthChecked()
Copyright © 2005–2017 Red5. All rights reserved.