public abstract class AbstractScopeAdapter extends Object implements IScopeHandler
| Constructor and Description |
|---|
AbstractScopeAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChildScope(IBasicScope scope)
Called just before a child scope is added.
|
void |
checkBandwidth(Object o)
Calls the checkBandwidth method on the current client.
|
Map<String,Object> |
checkBandwidthUp(Object[] params)
Calls the checkBandwidthUp method on the current client.
|
boolean |
connect(IConnection conn,
IScope scope,
Object[] params)
Called just before every connection to a scope.
|
void |
disconnect(IConnection conn,
IScope scope)
Called just after the a connection is disconnected.
|
boolean |
handleEvent(IEvent event)
Handle an event.
|
boolean |
join(IClient client,
IScope scope)
Called just before a client enters the scope.
|
void |
leave(IClient client,
IScope scope)
Called just after the client leaves the scope.
|
void |
removeChildScope(IBasicScope scope)
Called just after a child scope has been removed.
|
boolean |
serviceCall(IConnection conn,
IServiceCall call)
Called when a service is called.
|
void |
setCanCallService(boolean canCallService)
Setter for can call service flag
|
void |
setCanConnect(boolean canConnect)
Setter for can connect flag
|
void |
setCanStart(boolean canStart)
Setter for can start flag.
|
void |
setJoin(boolean canJoin)
Setter for 'can join' flag
|
boolean |
start(IScope scope)
Called when a scope is created for the first time.
|
void |
stop(IScope scope)
Called just before a scope is disposed.
|
public void setCanStart(boolean canStart)
canStart -
true
if scope is ready to be activated,
false
otherwisepublic void setCanCallService(boolean canCallService)
canCallService -
true
if remote service calls are allowed for the scope,
false
otherwisepublic void setCanConnect(boolean canConnect)
canConnect -
true
if connections to scope are allowed,
false
otherwisepublic void setJoin(boolean canJoin)
canJoin -
true
if scope may be joined by users,
false
otherwisepublic boolean start(IScope scope)
start in interface IScopeHandlerscope - the new scope objecttrueto allow,
falseto deny
public void stop(IScope scope)
stop in interface IScopeHandlerscope - Scope that id disposedpublic boolean connect(IConnection conn, IScope scope, Object[] params)
NetConnection.connectmethod (see below).
connect in interface IScopeHandlerconn - Connection objectscope - Scope objectparams - List of params passed from client via
NetConnection.connectmethod. All parameters but the first one passed to
NetConnection.connectmethod are available as params array.
trueto allow,
falseto deny
public void disconnect(IConnection conn, IScope scope)
disconnect in interface IScopeHandlerconn - Connection objectscope - Scope objectpublic boolean join(IClient client, IScope scope)
join in interface IScopeHandlerclient - Client objectscope - Scope that is joined by clienttrueto allow,
falseto deny connection
public void leave(IClient client, IScope scope)
leave in interface IScopeHandlerclient - Client objectscope - Scope objectpublic boolean serviceCall(IConnection conn, IServiceCall call)
serviceCall in interface IScopeHandlerconn - The connection objectcall - The call object.trueto allow,
falseto deny
public boolean addChildScope(IBasicScope scope)
addChildScope in interface IScopeHandlerscope - Scope that will be addedtrueto allow,
falseto deny
public void removeChildScope(IBasicScope scope)
removeChildScope in interface IScopeHandlerscope - Scope that has been removedpublic boolean handleEvent(IEvent event)
handleEvent in interface IEventHandlerevent - to handlepublic void checkBandwidth(Object o)
o - Object passed from Flash, not used at the momentCopyright © 2005–2017 Red5. All rights reserved.