/**
* EasyBeans
* Copyright (C) 2006 Bull S.A.S.
* Contact: easybeans@ow2.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* --------------------------------------------------------------------------
* $Id: JContainerConfig.java 1970 2007-10-16 11:49:25Z benoitf $
* --------------------------------------------------------------------------
*/
package org.ow2.easybeans.container;
import java.util.ArrayList;
import java.util.List;
import org.ow2.easybeans.api.EZBContainerConfig;
import org.ow2.easybeans.api.EZBContainerLifeCycleCallback;
import org.ow2.easybeans.api.EZBServer;
import org.ow2.easybeans.api.injection.ResourceInjector;
import org.ow2.util.ee.deploy.api.archive.IArchive;
/**
* Store Configuration for a {@link JContainer3} instance.
* @author Guillaume Sauthier
*/
public class JContainerConfig implements EZBContainerConfig {
/**
* EjbJar archive.
*/
private IArchive archive;
/**
* Embedded server.
*/
private EZBServer embedded;
/**
* Callback List.
*/
private List<EZBContainerLifeCycleCallback> callbacks;
/**
* Resource Injectors List.
*/
private List<ResourceInjector> injectors;
/**
* Constructor.
* @param archive the archive to process.
*/
public JContainerConfig(final IArchive archive) {
super();
this.archive = archive;
this.callbacks = new ArrayList<EZBContainerLifeCycleCallback>();
this.injectors = new ArrayList<ResourceInjector>();
}
/**
* @return the callbacks
*/
public List<EZBContainerLifeCycleCallback> getCallbacks() {
return callbacks;
}
/**
* @param callback the callbacks to add.
*/
public void addCallback(final EZBContainerLifeCycleCallback callback) {
this.callbacks.add(callback);
}
/**
* @return the archive
*/
public IArchive getArchive() {
return archive;
}
/**
* @return the injectors
*/
public List<ResourceInjector> getInjectors() {
return injectors;
}
/**
* @param injector the injectors to set
*/
public void addInjectors(final ResourceInjector injector) {
this.injectors.add(injector);
}
/**
* @return the embedded server
*/
public EZBServer getEZBServer() {
return embedded;
}
/**
* Sets the embedded server.
* @param embedded the embedded server of this config
*/
public void setEZBServer(final EZBServer embedded) {
this.embedded = embedded;
}
}
|