Package org.red5.server.api.scope
Interface IScopeHandler
- All Superinterfaces:
IEventHandler
- All Known Subinterfaces:
IStreamAwareScopeHandler
- All Known Implementing Classes:
AbstractScopeAdapter,AdminApplication,AntMediaApplicationAdapter,ApplicationAdapter,CoreHandler,MultiThreadedApplicationAdapter,StatefulScopeWrappingAdapter
The scope handler controls actions performed against a scope object, and also is notified of all events.
Gives fine grained control over what actions can be performed with the can* methods. Allows for detailed reporting on what is happening within the scope with the on* methods. This is the core interface users implement to create applications.
The thread local connection is always available via the Red5 object within these methods
- Author:
- The Red5 Project, Luke Hubbard ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChildScope(IBasicScope scope) Called just before a child scope is added.booleanconnect(IConnection conn, IScope scope, Object[] params) Called just before every connection to a scope.voiddisconnect(IConnection conn, IScope scope) Called just after the a connection is disconnected.booleanCalled just before a client enters the scope.voidCalled just after the client leaves the scope.voidremoveChildScope(IBasicScope scope) Called just after a child scope has been removed.booleanserviceCall(IConnection conn, IServiceCall call) Called when a service is called.booleanCalled when a scope is created for the first time.voidCalled just before a scope is disposed.Methods inherited from interface org.red5.server.api.event.IEventHandler
handleEvent
-
Method Details
-
start
Called when a scope is created for the first time.- Parameters:
scope- the new scope object- Returns:
true
to allow,false
to deny
-
stop
Called just before a scope is disposed.- Parameters:
scope- Scope that id disposed
-
connect
Called just before every connection to a scope. You can pass additional params from client usingNetConnection.connect
method (see below).- Parameters:
conn- Connection objectparams- List of params passed from client viaNetConnection.connect
method. All parameters but the first one passed toNetConnection.connect
method are available as params array.scope- Scope object- Returns:
true
to allow,false
to deny
-
disconnect
Called just after the a connection is disconnected.- Parameters:
conn- Connection objectscope- Scope object
-
addChildScope
Called just before a child scope is added.- Parameters:
scope- Scope that will be added- Returns:
true
to allow,false
to deny
-
removeChildScope
Called just after a child scope has been removed.- Parameters:
scope- Scope that has been removed
-
join
Called just before a client enters the scope.- Parameters:
client- Client objectscope- Scope that is joined by client- Returns:
true
to allow,false
to deny connection
-
leave
Called just after the client leaves the scope.- Parameters:
client- Client objectscope- Scope object
-
serviceCall
Called when a service is called.- Parameters:
conn- The connection objectcall- The call object.- Returns:
true
to allow,false
to deny
-