## org.red5.server.adapter
Class ApplicationLifecycle

    java.lang.Object
      org.red5.server.adapter.ApplicationLifecycle

All Implemented Interfaces:
  IApplication

    public class ApplicationLifecycle

extends Object
implements IApplication

Author:
  Dominick Accattato (daccattato@gmail.com)

Constructor Summary
`ApplicationLifecycle()`

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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ApplicationLifecycle

    public ApplicationLifecycle()

Method Detail

### appConnect

    public boolean appConnect(IConnection conn,
                              Object[] params)

  Description copied from interface: `IApplication`
  Called per each client connect

  Specified by:
    `appConnect` in interface `IApplication`
  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

### appDisconnect

    public void appDisconnect(IConnection conn)

  Description copied from interface: `IApplication`
  Called every time client disconnects from the application

  Specified by:
    `appDisconnect` in interface `IApplication`
  Parameters:
    `conn` - Connection object See `IConnection`

### appJoin

    public boolean appJoin(IClient client,
                           IScope app)

  Description copied from interface: `IApplication`
  Called every time client joins app level scope

  Specified by:
    `appJoin` in interface `IApplication`
  Parameters:
    `client` - Client object
    `app` - Scope object
  Returns:
    `true` accepts the client, `false` rejects it

### appLeave

    public void appLeave(IClient client,
                         IScope app)

  Description copied from interface: `IApplication`
  Called every time client leaves the application scope

  Specified by:
    `appLeave` in interface `IApplication`
  Parameters:
    `client` - Client object
    `app` - Scope object

### appStart

    public boolean appStart(IScope app)

  Description copied from interface: `IApplication`
  Called once when application or room starts

  Specified by:
    `appStart` in interface `IApplication`
  Parameters:
    `app` - Application or room level scope. See `IScope` for details
  Returns:
    `true` continues application run, `false` terminates

### appStop

    public void appStop(IScope app)

  Description copied from interface: `IApplication`
  Called on application stop

  Specified by:
    `appStop` in interface `IApplication`
  Parameters:
    `app` - Scope object

### roomConnect

    public boolean roomConnect(IConnection conn,
                               Object[] params)

  Description copied from interface: `IApplication`
  Called every time client connects to the room

  Specified by:
    `roomConnect` in interface `IApplication`
  Parameters:
    `conn` - Connection object
    `params` - List of params sent from client with NetConnection.connect call
  Returns:
    `true` accepts the connection, `false` rejects it

### roomDisconnect

    public void roomDisconnect(IConnection conn)

  Description copied from interface: `IApplication`
  Called when client disconnects from room scope

  Specified by:
    `roomDisconnect` in interface `IApplication`
  Parameters:
    `conn` - Connection object used to provide basic connection methods. See `IConnection`

### roomJoin

    public boolean roomJoin(IClient client,
                            IScope room)

  Description copied from interface: `IApplication`
  Called when user joins room scope

  Specified by:
    `roomJoin` in interface `IApplication`
  Parameters:
    `client` - Client object
    `room` - Scope object
  Returns:
    `true` accepts the client, `false` rejects it

### roomLeave

    public void roomLeave(IClient client,
                          IScope room)

  Description copied from interface: `IApplication`
  Called when user leaves room scope

  Specified by:
    `roomLeave` in interface `IApplication`
  Parameters:
    `client` - Client object
    `room` - Scope object

### roomStart

    public boolean roomStart(IScope room)

  Description copied from interface: `IApplication`
  Called on application room start

  Specified by:
    `roomStart` in interface `IApplication`
  Parameters:
    `room` - Scope object
  Returns:
    `true` if scope can be started, `false` otherwise

### roomStop

    public void roomStop(IScope room)

  Description copied from interface: `IApplication`
  Called on room scope stop

  Specified by:
    `roomStop` in interface `IApplication`
  Parameters:
    `room` - Scope object

Copyright © 2006-2010 The Red5 Project