org.astrogrid.jes.delegate
Class JesDelegateFactory

java.lang.Object
  extended byorg.astrogrid.jes.delegate.JesDelegateFactory

public class JesDelegateFactory
extends java.lang.Object

Factory for JES delegates.

Delegates to JES web services - JobController and JobMonitor - can be created by either passing in a service endpoint explicitly, or by letting the factory try to locate an endpoint in the system configuration.

Author:
Noel Winstanley nw@jb.man.ac.uk 06-Feb-2004

Field Summary
static java.lang.String JOB_CONTROLLER_ENDPOINT_KEY
          default key to search config for a controller endpoint
static java.lang.String JOB_MONITOR_ENDPOINT_KEY
          default key to search config for a monitor endpoint
 
Constructor Summary
JesDelegateFactory()
           
 
Method Summary
static JobController createJobController()
          create a job controller delegate, loading endpoint from Config
static JobController createJobController(java.lang.String url)
          create a job controller delegate
static JobController createJobController(java.lang.String url, int timeout)
          create a job controller delegate
static JobMonitor createJobMonitor()
          create a job monitor delegate, loading endpoint from Config
static JobMonitor createJobMonitor(java.lang.String url)
          create a job monitor delegate
static JobMonitor createJobMonitor(java.lang.String url, int timeout)
          create a job monitor delegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB_CONTROLLER_ENDPOINT_KEY

public static final java.lang.String JOB_CONTROLLER_ENDPOINT_KEY
default key to search config for a controller endpoint

See Also:
Constant Field Values

JOB_MONITOR_ENDPOINT_KEY

public static final java.lang.String JOB_MONITOR_ENDPOINT_KEY
default key to search config for a monitor endpoint

See Also:
Constant Field Values
Constructor Detail

JesDelegateFactory

public JesDelegateFactory()
Method Detail

createJobController

public static JobController createJobController(java.lang.String url)
create a job controller delegate

Parameters:
url - endpoint
Returns:
a delegate

createJobController

public static JobController createJobController(java.lang.String url,
                                                int timeout)
create a job controller delegate

Parameters:
url - endpoint of service to connect to
timeout - timeout value to use for connection
Returns:
a delegate

createJobController

public static JobController createJobController()
                                         throws PropertyNotFoundException
create a job controller delegate, loading endpoint from Config

Returns:
a delegate
Throws:
PropertyNotFoundException - if key JOB_CONTROLLER_ENDPOINT_KEY is not found in default config
See Also:
SimpleConfig

createJobMonitor

public static JobMonitor createJobMonitor(java.lang.String url)
create a job monitor delegate

Parameters:
url - endpoint of monitor service
Returns:
a delegate for this service

createJobMonitor

public static JobMonitor createJobMonitor(java.lang.String url,
                                          int timeout)
create a job monitor delegate

Parameters:
url - endpoint of monitor service
timeout - timeout value for the connection
Returns:
a delegate for this service

createJobMonitor

public static JobMonitor createJobMonitor()
                                   throws PropertyNotFoundException
create a job monitor delegate, loading endpoint from Config

Returns:
a delegate
Throws:
PropertyNotFoundException - if key JOB_MONITOR_ENDPOINT_KEY is not found in default config
See Also:
SimpleConfig


Copyright © 2002-2007 AstroGrid. All Rights Reserved.