Thread: [Batchserver-cvs] batchserver/src/org/jmonks/batchserver/framework/config BasicJobControllerConfig.j
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-03-03 04:19:59
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30411/config Added Files: BasicJobControllerConfig.java FrameworkConfig.java JobConfig.java JobConfigFactory.java JobControllerConfig.java PoolJobControllerConfig.java Removed Files: Logging.properties Log Message: Submitting the class skeltons --- NEW FILE: JobConfig.java --- /* * JobConfig.java * * Created on March 2, 2006, 11:40 AM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; import java.util.Map; /** * * @author Suresh Pragada */ public abstract class JobConfig { protected String mJobName=null; protected Object mJobControllerConfig=null; public Object getJobControllerConfig() { return this.mJobControllerConfig; } public String getJobName() { return this.mJobName; } } --- NEW FILE: BasicJobControllerConfig.java --- /* * BasicJobControllerConfig.java * * Created on March 2, 2006, 1:44 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; import java.util.Map; /** * * @author Suresh Pragada */ public abstract class BasicJobControllerConfig extends JobControllerConfig { protected final static String CONFIG_PROPERTY_PREFIX = "basic-job-controller-"; protected String mBasicJobProcessorClassName=null; protected Map mBasicJobProcessorConfigProps=null; public String getBasicJobProcessorClassName() { return this.mBasicJobProcessorClassName; } public Map getBasicJobProcessorConfigProperties() { return this.mBasicJobProcessorConfigProps; } protected String getJobControllerConfigPropertyPrefix() { return BasicJobControllerConfig.CONFIG_PROPERTY_PREFIX; } /** * Base implementation overrides the properties in controller config props only. * So, override all the props like loader, process and pool here along with controller * config props. */ public void overrideConfigProperties(Map newProps) { super.overrideConfigProperties(newProps); /** * Override the loader, processor and pool here. */ } } --- NEW FILE: FrameworkConfig.java --- /* * FrameworkConfig.java * * Created on March 2, 2006, 11:21 AM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; import java.util.Map; import org.w3c.dom.Element; /** * * @author Suresh Pragada */ public final class FrameworkConfig { private static final FrameworkConfig mFrameworkConfig=new FrameworkConfig(); private static final String FRAMEWORK_CONFIG_FILE = "org.jmonks.batchserver.framework.config.framework-config.xml"; /** Creates a new instance of FrameworkConfig */ private FrameworkConfig() { } public static FrameworkConfig getInstance() { return mFrameworkConfig; } public JobConfigFactoryConfig getJobConfigFactoryConfig() { return null; } public LoggingConfig getLoggingConfig() { return null; } public MgmtMntrConfig getMgmtMntrConfig() { return null; } public FrameworkConfig$RepositoryConfig getRepositoryConfig() { return null; } public class JobConfigFactoryConfig { private JobConfigFactoryConfig(Element jobConfigFactoryElement) { } public String getJobConfigFactoryClassName() { return null; } public Map getJobConfigFactoryProperties() { return null; } } public class LoggingConfig { private LoggingConfig(Element loggingConfigElement) { } public String getLoggingDirecotry() { return null; } public int getFrameworkLogLevel() { return 1; } public String getBasePackageName() { return null; } } public class MgmtMntrConfig { private MgmtMntrConfig(Element mgmtMntrConfigElement) { } public String getMgmtMntrClassName() { return null; } public Map getMgmtMntrProperties() { return null; } } public class RepositoryConfig { private RepositoryConfig(Element repositoryConfigElement) { } public String getRepositoryClassName() { return null; } public Map getRepositoryConfigProperties() { return null; } } } --- NEW FILE: JobConfigFactory.java --- /* * JobConfigFactory.java * * Created on March 2, 2006, 11:35 AM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; /** * * @author Suresh Pragada */ public abstract class JobConfigFactory { /** Creates a new instance of JobConfigFactory */ public static JobConfigFactory getJobConfigFactory(FrameworkConfig.JobConfigFactoryConfig factoryConfig) { return null; } public abstract JobConfig getJobConfig(String jobName); } --- NEW FILE: JobControllerConfig.java --- /* * JobControllerConfig.java * * Created on March 2, 2006, 12:12 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; import java.util.Map; /** * * @author Suresh Pragada */ public abstract class JobControllerConfig { protected String mJobControllerClassName=null; protected Map mJobControllerConfigProps=null; public String getJobControllerClasName() { return this.mJobControllerClassName; } public Map getJobControllerConfigProperties() { return this.mJobControllerConfigProps; } /** * Overrides all the config properties by taking the prefix from sub classes. */ public void overrideConfigProperties(Map newProps) { } protected abstract String getJobControllerConfigPropertyPrefix(); } --- Logging.properties DELETED --- --- NEW FILE: PoolJobControllerConfig.java --- /* * PoolJobControllerConfig.java * * Created on March 2, 2006, 1:24 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package org.jmonks.batchserver.framework.config; import java.util.Map; /** * * @author Suresh Pragada */ public abstract class PoolJobControllerConfig extends JobControllerConfig { protected final static String CONFIG_PROPERTY_PREFIX = "pool-job-controller-"; protected String mPoolJobLoaderClassName=null; protected Map mPoolJobLoaderConfigProps=null; protected String mPoolJobProcessorClassName=null; protected Map mPoolJobProcessorConfigProps=null; protected String mPoolClassName=null; protected Map mPoolConfigProps=null; public String getPoolJobLoaderClassName() { return this.mPoolJobLoaderClassName; } public Map getPoolJobLoaderConfigProperties() { return this.mPoolJobLoaderConfigProps; } public String getPoolJobProcessorClassName() { return this.mPoolJobProcessorClassName; } public Map getPoolJobProcessorConfigProperties() { return this.mPoolJobProcessorConfigProps; } public String getPoolClassName() { return this.mPoolClassName; } public Map getPoolConfigProperties() { return this.mPoolConfigProps; } protected String getJobControllerConfigPropertyPrefix() { return PoolJobControllerConfig.CONFIG_PROPERTY_PREFIX; } /** * Base implementation overrides the properties in controller config props only. * So, override all the props like loader, process and pool here along with controller * config props. */ public void overrideConfigProperties(Map newProps) { super.overrideConfigProperties(newProps); /** * Override the loader, processor and pool here. */ } } |