blob: 590a6a321b8e9755918f0f3e584353f816b01d8b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.ptp.rm.mpi.mpich2.core.rmsystem;
import org.eclipse.ptp.core.PTPCorePlugin;
import org.eclipse.ptp.core.elementcontrols.IPUniverseControl;
import org.eclipse.ptp.core.elementcontrols.IResourceManagerControl;
import org.eclipse.ptp.rmsystem.AbstractResourceManagerFactory;
import org.eclipse.ptp.rmsystem.IResourceManagerConfiguration;
import org.eclipse.ui.IMemento;
/**
*
* @author Daniel Felix Ferber
*
*/
public class MPICH2ResourceManagerFactory extends AbstractResourceManagerFactory {
/* (non-Javadoc)
* @see org.eclipse.ptp.rmsystem.IResourceManagerFactory#create(org.eclipse.ptp.rmsystem.IResourceManagerConfiguration)
*/
public IResourceManagerControl create(IResourceManagerConfiguration confIn) {
IMPICH2ResourceManagerConfiguration configuration = (IMPICH2ResourceManagerConfiguration) confIn;
PTPCorePlugin plugin = PTPCorePlugin.getDefault();
IPUniverseControl universe = (IPUniverseControl) plugin.getUniverse();
return new MPICH2ResourceManager(universe.getNextResourceManagerId(), universe, configuration);
}
/* (non-Javadoc)
* @see org.eclipse.ptp.rmsystem.IResourceManagerFactory#createConfiguration()
*/
public IResourceManagerConfiguration createConfiguration() {
return new MPICH2ResourceManagerConfiguration(this);
}
/* (non-Javadoc)
* @see org.eclipse.ptp.rmsystem.IResourceManagerFactory#loadConfiguration(org.eclipse.ui.IMemento)
*/
public IResourceManagerConfiguration loadConfiguration(IMemento memento) {
return MPICH2ResourceManagerConfiguration.load(this, memento);
}
}