

package org.red5.server.plugin;

import org.red5.server.Server;
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
import org.red5.server.api.plugin.IRed5Plugin;
import org.springframework.context.ApplicationContext;

/**
 * Provides more features to the plug-in system.
 * 
 * @author Paul Gregoire (mondain@gmail.com)
 */
public abstract class Red5Plugin implements IRed5Plugin {

    protected ApplicationContext context;

    protected Server server;

    /** {@inheritDoc} */
    public void doStart() throws Exception {
    }

    /** {@inheritDoc} */
    public void doStop() throws Exception {
    }

    /**
     * Initialize the plug-in
     */
    public void init() {
    }

    /** {@inheritDoc} */
    public String getName() {
        return null;
    }

    /** {@inheritDoc} */
    public void setApplicationContext(ApplicationContext context) {
        this.context = context;
    }

    /**
     * Return the server reference.
     * 
     * @return server
     */
    public Server getServer() {
        return server;
    }

    /** {@inheritDoc} */
    public void setServer(Server server) {
        this.server = server;
    }

    /**
     * Set the application making use of this plug-in.
     * 
     * @param application
     *            application
     */
    public void setApplication(MultiThreadedApplicationAdapter application) {
    }

}
