00001 /* 00002 * ################################################################ 00003 * 00004 * ProActive: The Java(TM) library for Parallel, Distributed, 00005 * Concurrent computing with Security and Mobility 00006 * 00007 * Copyright (C) 1997-2007 INRIA/University of Nice-Sophia Antipolis 00008 * Contact: proactive@objectweb.org 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2.1 of the License, or any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 * USA 00024 * 00025 * Initial developer(s): The ProActive Team 00026 * http://www.inria.fr/oasis/ProActive/contacts.html 00027 * Contributor(s): 00028 * 00029 * ################################################################ 00030 */ 00031 package org.objectweb.proactive.core.descriptor.xml; 00032 00033 import org.objectweb.proactive.core.descriptor.data.ProActiveDescriptor; 00034 import org.objectweb.proactive.core.xml.handler.CollectionUnmarshaller; 00035 import org.objectweb.proactive.core.xml.handler.PassiveCompositeUnmarshaller; 00036 import org.objectweb.proactive.scheduler.Scheduler; 00037 00038 00045 class InfrastructureHandler extends PassiveCompositeUnmarshaller 00046 implements ProActiveDescriptorConstants { 00047 // 00048 // ----- PRIVATE MEMBERS ----------------------------------------------------------------------------------- 00049 // 00050 // 00051 // ----- CONSTRUCTORS ----------------------------------------------------------------------------------- 00052 // 00053 public InfrastructureHandler(ProActiveDescriptor proActiveDescriptor) { 00054 super(false); 00055 CollectionUnmarshaller ch = new CollectionUnmarshaller(); 00056 ch.addHandler(PROCESS_DEFINITION_TAG, 00057 new ProcessDefinitionHandler(proActiveDescriptor)); 00058 this.addHandler(PROCESSES_TAG, ch); 00059 ch.addHandler(SERVICE_DEFINITION_TAG, 00060 new ServiceDefinitionHandler(proActiveDescriptor)); 00061 this.addHandler(SERVICES_TAG, ch); 00062 } 00063 00064 public InfrastructureHandler(Scheduler scheduler, String jobId, 00065 ProActiveDescriptor proActiveDescriptor) { 00066 super(false); 00067 CollectionUnmarshaller ch = new CollectionUnmarshaller(); 00068 ch.addHandler(SERVICE_DEFINITION_TAG, 00069 new ServiceDefinitionHandler(scheduler, jobId, proActiveDescriptor)); 00070 this.addHandler(SERVICES_TAG, ch); 00071 ch.addHandler(PROCESS_DEFINITION_TAG, 00072 new ProcessDefinitionHandler(proActiveDescriptor)); 00073 this.addHandler(PROCESSES_TAG, ch); 00074 } 00075 00076 // 00077 // ----- PUBLIC METHODS ----------------------------------------------------------------------------------- 00078 // 00079 // 00080 // ----- PROTECTED METHODS ----------------------------------------------------------------------------------- 00081 // 00082 // 00083 // ----- INNER CLASSES ----------------------------------------------------------------------------------- 00084 // 00085 }
1.5.1