UNICORE Resource Broker NJS Plugin
1.5α1

org.eurogrid.broker.server.ws
Class BrokerNJSIfc

java.lang.Object
  |
  +--org.eurogrid.broker.server.AbstractBroker
        |
        +--org.eurogrid.broker.server.ws.BrokerNJSIfc
All Implemented Interfaces:
NamedPlugin, ResourceBroker, ResourceChecker

public class BrokerNJSIfc
extends AbstractBroker

The part of the Broker webservice that plugs into an NJS.

Author:
Donal K. Fellows
See Also:
ServerCore

Nested Class Summary
static class BrokerNJSIfc.Service
           
 
Field Summary
static String DEFAULT_IDENTITY
           
static long DEFAULT_TIME_TO_LIVE
           
static String VERSION
           
 
Fields inherited from class org.eurogrid.broker.server.AbstractBroker
controlState, isInitialised, localVsiteName, logger
 
Constructor Summary
BrokerNJSIfc()
           
 
Method Summary
protected  void checkQoS(CheckQoS task, IncarnatedUser incedUser, User user, byte[] extraInformation, CheckQoS_Outcome outcome)
          Perform a CheckQoS, producing an outcome.
protected  void checkResources(CheckResources task, IncarnatedUser incedUser, User user, byte[] extraInformation, CheckResources_Outcome outcome)
          Perform a CheckResources, producing an outcome.
 String claim(Ticket ticket, ResourceSet resources, IncarnatedUser inced_user, User user)
           
 String getFormalName()
          Get the formal name of the plugin.
static BrokerNJSIfc getInstance()
           
 String getName()
          Get the name of the plugin.
 String getQoSData(int nodes, int procs, int memory, int time, User user)
           
 Ticket getTicket(ResourceSet resourceSet, int validity)
           
protected  String initialise(Vsite vsite, ResourceSet resources, ResourceChecker.NJS njs, Element init)
          Initialise the core of the broker.
protected  void logBannerMessage()
          Write the main banner message to the log.
static Element readXMLfromFile(File f)
           
 VsiteEstimateMap runDelegatedQoSCheck(TaskResourceDAG resourceDAG, Vsite[] hosts, User user, byte[] context)
           
 VsiteTaskIDStatusMap runDelegatedResCheck(TaskResourceDAG resourceDAG, Vsite[] hosts, User user, byte[] context)
           
 
Methods inherited from class org.eurogrid.broker.server.AbstractBroker
apply, getLogger, getLogger, getQoSCheckResource, getResourceCheckResource, getState, incarnateCheckQoS, incarnateCheckResources, initialise, initialiseLogger, nextJobID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IDENTITY

public static final String DEFAULT_IDENTITY
See Also:
Constant Field Values

DEFAULT_TIME_TO_LIVE

public static final long DEFAULT_TIME_TO_LIVE
See Also:
Constant Field Values

VERSION

public static final String VERSION
See Also:
Constant Field Values
Constructor Detail

BrokerNJSIfc

public BrokerNJSIfc()
Method Detail

checkQoS

protected void checkQoS(CheckQoS task,
                        IncarnatedUser incedUser,
                        User user,
                        byte[] extraInformation,
                        CheckQoS_Outcome outcome)
                 throws ResourceCheckerException
Description copied from class: AbstractBroker
Perform a CheckQoS, producing an outcome.

Specified by:
checkQoS in class AbstractBroker
Parameters:
task - the request to check resources that requires incarnation
incedUser - the incarnated user performing the check
user - the user performing the check
outcome - the incarnated user performing the check
ResourceCheckerException

checkResources

protected void checkResources(CheckResources task,
                              IncarnatedUser incedUser,
                              User user,
                              byte[] extraInformation,
                              CheckResources_Outcome outcome)
                       throws ResourceCheckerException
Description copied from class: AbstractBroker
Perform a CheckResources, producing an outcome.

Specified by:
checkResources in class AbstractBroker
Parameters:
task - the request to check resources that requires incarnation
incedUser - the incarnated user performing the check
user - the User performing the check
outcome - the incarnated user performing the check
ResourceCheckerException

claim

public String claim(Ticket ticket,
                    ResourceSet resources,
                    IncarnatedUser inced_user,
                    User user)
             throws ResourceCheckerException
ResourceCheckerException

getFormalName

public String getFormalName()
Description copied from interface: NamedPlugin
Get the formal name of the plugin. This should be long enough to allow people who are not experts with the code to understand it, and will be written to the log to associate itself with the shorter name.


getInstance

public static BrokerNJSIfc getInstance()

getName

public String getName()
Description copied from interface: NamedPlugin
Get the name of the plugin. This should be fairly short so that the logging messages aren't too massive.


getQoSData

public String getQoSData(int nodes,
                         int procs,
                         int memory,
                         int time,
                         User user)

getTicket

public Ticket getTicket(ResourceSet resourceSet,
                        int validity)
                 throws ResourceCheckerException
ResourceCheckerException

initialise

protected String initialise(Vsite vsite,
                            ResourceSet resources,
                            ResourceChecker.NJS njs,
                            Element init)
                     throws ResourceCheckerException
Description copied from class: AbstractBroker
Initialise the core of the broker.

Specified by:
initialise in class AbstractBroker
Parameters:
vsite - The Vsite where we are.
resources - The resources at this Vsite.
njs - The hosting NJS.
init - The root of the broker's XML/DOM configuration tree.
Returns:
The name of the host Vsite for use in broker-loop detection.
ResourceCheckerException

logBannerMessage

protected void logBannerMessage()
Description copied from class: AbstractBroker
Write the main banner message to the log. At least one line should be written at level CONFIG and any additional lines should be at level INFO.

Specified by:
logBannerMessage in class AbstractBroker

readXMLfromFile

public static Element readXMLfromFile(File f)
                               throws ResourceCheckerException
ResourceCheckerException

runDelegatedQoSCheck

public VsiteEstimateMap runDelegatedQoSCheck(TaskResourceDAG resourceDAG,
                                             Vsite[] hosts,
                                             User user,
                                             byte[] context)
                                      throws ResourceCheckerException
ResourceCheckerException

runDelegatedResCheck

public VsiteTaskIDStatusMap runDelegatedResCheck(TaskResourceDAG resourceDAG,
                                                 Vsite[] hosts,
                                                 User user,
                                                 byte[] context)
                                          throws ResourceCheckerException
ResourceCheckerException

UNICORE Resource Broker NJS Plugin
1.5α1

Submit a bug or feature
Copyright © 2002-2004 University of Manchester, U.K. See license.terms for details.