public class ApplicationLifecycle extends Object implements IApplication
Constructor and Description |
---|
ApplicationLifecycle() |
Modifier and Type | Method and Description |
---|---|
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
|
public boolean appConnect(IConnection conn, Object[] params)
IApplication
appConnect
in interface IApplication
conn
- Connection object used to provide basic connection methods.
See IConnection
params
- List of params sent from client with NetConnection.connect
calltrue
accepts the connection, false
rejects itpublic void appDisconnect(IConnection conn)
IApplication
appDisconnect
in interface IApplication
conn
- Connection object See IConnection
public boolean appJoin(IClient client, IScope app)
IApplication
appJoin
in interface IApplication
client
- Client objectapp
- Scope objecttrue
accepts the client, false
rejects itpublic void appLeave(IClient client, IScope app)
IApplication
appLeave
in interface IApplication
client
- Client objectapp
- Scope objectpublic boolean appStart(IScope app)
IApplication
appStart
in interface IApplication
app
- Application or room level scope. See
IScope
for detailstrue
continues application run, false
terminatespublic void appStop(IScope app)
IApplication
appStop
in interface IApplication
app
- Scope objectpublic boolean roomConnect(IConnection conn, Object[] params)
IApplication
roomConnect
in interface IApplication
conn
- Connection objectparams
- List of params sent from client with NetConnection.connect
calltrue
accepts the connection, false
rejects itpublic void roomDisconnect(IConnection conn)
IApplication
roomDisconnect
in interface IApplication
conn
- Connection object used to provide basic connection methods.
See IConnection
public boolean roomJoin(IClient client, IScope room)
IApplication
roomJoin
in interface IApplication
client
- Client objectroom
- Scope objecttrue
accepts the client, false
rejects itpublic void roomLeave(IClient client, IScope room)
IApplication
roomLeave
in interface IApplication
client
- Client objectroom
- Scope objectpublic boolean roomStart(IScope room)
IApplication
roomStart
in interface IApplication
room
- Scope objecttrue
if scope can be started, false
otherwisepublic void roomStop(IScope room)
IApplication
roomStop
in interface IApplication
room
- Scope objectCopyright © 2006-2012 The Red5 Project