GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

SoftwareResource.java

Go to the documentation of this file.
00001 /*
00002  * Created on Apr 22, 2004
00003  */
00004 package org.gridlab.gat.resources;
00005 
00006 import org.gridlab.gat.GATContext;
00007 import org.gridlab.gat.Preferences;
00008 import org.gridlab.gat.engine.GATEngine;
00009 import org.gridlab.gat.resources.cpi.SoftwareResourceCpi;
00010 
00011 /**
00012  * @author rob
00013  */
00014 public abstract class SoftwareResource implements Resource {
00015 
00016     GATContext gatContext;
00017 
00018     Preferences preferences;
00019 
00020     protected SoftwareResource(GATContext gatContext, Preferences preferences) {
00021         this.gatContext = gatContext;
00022         this.preferences = preferences;
00023     }
00024 
00025     public static SoftwareResource create(GATContext gatContext) {
00026         return create(gatContext, null);
00027     }
00028 
00029     public static SoftwareResource create(GATContext gatContext,
00030             Preferences preferences) {
00031         GATEngine gatEngine = GATEngine.getGATEngine();
00032 
00033         SoftwareResourceCpi s = (SoftwareResourceCpi) gatEngine.getAdaptor(
00034                 SoftwareResourceCpi.class, gatContext, preferences, null);
00035         return s;
00036     }
00037 }