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.

Author:
Dominick Accattato

Method Summary
 boolean appConnect(IConnection conn, Object[] params)
          Called per each client connect
 void appDisconnect(IConnection conn)
          Called every time client disconnects from the application
 boolean appJoin(IClient client, IScope app)
          Called every time client joins app level scope
 void appLeave(IClient client, IScope app)
          Called every time client leaves the application scope
 boolean appStart(IScope app)
          Called once when application or room starts
 void appStop(IScope app)
          Called on application stop
 boolean roomConnect(IConnection conn, Object[] params)
          Called every time client connects to the room
 void roomDisconnect(IConnection conn)
          Called when client disconnects from room scope
 boolean roomJoin(IClient client, IScope room)
          Called when user joins room scope
 void roomLeave(IClient client, IScope room)
          Called when user leaves room scope
 boolean roomStart(IScope room)
          Called on application room start
 void roomStop(IScope room)
          Called on room scope stop
 

Method Detail

appStart

boolean appStart(IScope app)
Called once when application or room starts

Parameters:
app - Application or room level scope. See IScope for details
Returns:
true continues application run, false terminates

appConnect

boolean appConnect(IConnection conn,
                   Object[] params)
Called per each client connect

Parameters:
conn - Connection object used to provide basic connection methods. See IConnection
params - List of params sent from client with NetConnection.connect call
Returns:
true accepts the connection, false rejects it

appJoin

boolean appJoin(IClient client,
                IScope app)
Called every time client joins app level scope

Parameters:
client - Client object
app - Scope object
Returns:
true accepts the client, false rejects it

appDisconnect

void appDisconnect(IConnection conn)
Called every time client disconnects from the application

Parameters:
conn - Connection object See IConnection

appLeave

void appLeave(IClient client,
              IScope app)
Called every time client leaves the application scope

Parameters:
client - Client object
app - Scope object

appStop

void appStop(IScope app)
Called on application stop

Parameters:
app - Scope object

roomStart

boolean roomStart(IScope room)
Called on application room start

Parameters:
room - Scope object
Returns:
true if scope can be started, false otherwise

roomConnect

boolean roomConnect(IConnection conn,
                    Object[] params)
Called every time client connects to the room

Parameters:
conn - Connection object
params - List of params sent from client with NetConnection.connect call
Returns:
true accepts the connection, false rejects it

roomJoin

boolean roomJoin(IClient client,
                 IScope room)
Called when user joins room scope

Parameters:
client - Client object
room - Scope object
Returns:
true accepts the client, false rejects it

roomDisconnect

void roomDisconnect(IConnection conn)
Called when client disconnects from room scope

Parameters:
conn - Connection object used to provide basic connection methods. See IConnection

roomLeave

void roomLeave(IClient client,
               IScope room)
Called when user leaves room scope

Parameters:
client - Client object
room - Scope object

roomStop

void roomStop(IScope room)
Called on room scope stop

Parameters:
room - Scope object


Copyright © 2006-2012 The Red5 Project