|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.adapter.AbstractScopeAdapter
public abstract class AbstractScopeAdapter
Base scope handler implementation. Meant to be subclassed.
Constructor Summary | |
---|---|
AbstractScopeAdapter()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractScopeAdapter()
Method Detail |
---|
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 IScopeHandler
scope
- the new scope object
true
to allow, false
to denypublic void stop(IScope scope)
stop
in interface IScopeHandler
scope
- Scope that id disposedpublic boolean connect(IConnection conn, IScope scope, Object[] params)
NetConnection.connect
method (see
below).
connect
in interface IScopeHandler
conn
- Connection objectscope
- Scope objectparams
- List of params passed from client via
NetConnection.connect
method. All parameters
but the first one passed to NetConnection.connect
method are available as params array.
true
to allow, false
to denypublic void disconnect(IConnection conn, IScope scope)
disconnect
in interface IScopeHandler
conn
- Connection objectscope
- Scope objectpublic boolean join(IClient client, IScope scope)
join
in interface IScopeHandler
client
- Client objectscope
- Scope that is joined by client
true
to allow, false
to deny
connectionpublic void leave(IClient client, IScope scope)
leave
in interface IScopeHandler
client
- Client objectscope
- Scope objectpublic boolean serviceCall(IConnection conn, IServiceCall call)
serviceCall
in interface IScopeHandler
conn
- The connection objectcall
- The call object.
true
to allow, false
to denypublic boolean addChildScope(IBasicScope scope)
addChildScope
in interface IScopeHandler
scope
- Scope that will be added
true
to allow, false
to denypublic void removeChildScope(IBasicScope scope)
removeChildScope
in interface IScopeHandler
scope
- Scope that has been removedpublic boolean handleEvent(IEvent event)
handleEvent
in interface IEventHandler
event
- event to handle
public void checkBandwidth(Object o)
o
- Object passed from Flash, not used at the momentpublic Map<String,Object> checkBandwidthUp(Object[] params)
params
- Object passed from Flash
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |