Package org.red5.server.adapter
Interface IApplication
- All Known Implementing Classes:
ApplicationLifecycle
public interface IApplication
IApplication provides lifecycle methods that most communication applications will use. This interface defines the methods that are called by Red5 through an applications life. It is suggested that you NOT implement this interface yourself, but instead you should subclass org.red5.server.adapter.MultiThreadedApplicationAdapter or org.red5.server.adapter.ApplicationAdapter.
- Author:
- Dominick Accattato
-
Method Summary
Modifier and TypeMethodDescriptionbooleanappConnect(IConnection conn, Object[] params) Called per each client connectvoidappDisconnect(IConnection conn) Called every time client disconnects from the applicationbooleanCalled every time client joins app level scopevoidCalled every time client leaves the application scopebooleanCalled once when application or room startsvoidCalled on application stopbooleanroomConnect(IConnection conn, Object[] params) Called every time client connects to the roomvoidroomDisconnect(IConnection conn) Called when client disconnects from room scopebooleanCalled when user joins room scopevoidCalled when user leaves room scopebooleanCalled on application room startvoidCalled on room scope stop
-
Method Details
-
appStart
Called once when application or room starts- Parameters:
app- Application or room level scope. SeeIScopefor details- Returns:
true
continues application run,false
terminates
-
appConnect
Called per each client connect- Parameters:
conn- Connection object used to provide basic connection methods. SeeIConnectionparams- List of params sent from client with NetConnection.connect call- Returns:
true
accepts the connection,false
rejects it
-
appJoin
Called every time client joins app level scope- Parameters:
client- Client objectapp- Scope object- Returns:
true
accepts the client,false
rejects it
-
appDisconnect
Called every time client disconnects from the application- Parameters:
conn- Connection object SeeIConnection
-
appLeave
Called every time client leaves the application scope- Parameters:
client- Client objectapp- Scope object
-
appStop
Called on application stop- Parameters:
app- Scope object
-
roomStart
Called on application room start- Parameters:
room- Scope object- Returns:
true
if scope can be started,false
otherwise
-
roomConnect
Called every time client connects to the room- Parameters:
conn- Connection objectparams- List of params sent from client with NetConnection.connect call- Returns:
true
accepts the connection,false
rejects it
-
roomJoin
Called when user joins room scope- Parameters:
client- Client objectroom- Scope object- Returns:
true
accepts the client,false
rejects it
-
roomDisconnect
Called when client disconnects from room scope- Parameters:
conn- Connection object used to provide basic connection methods. SeeIConnection
-
roomLeave
Called when user leaves room scope- Parameters:
client- Client objectroom- Scope object
-
roomStop
Called on room scope stop- Parameters:
room- Scope object
-