View Javadoc

1   /*$Id: RegistryEndpointFromConfig.java,v 1.5 2004/07/01 21:15:00 nw Exp $
2    * Created on 08-Mar-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.jes.component.production;
12  
13  import org.astrogrid.component.descriptor.SimpleComponentDescriptor;
14  import org.astrogrid.config.Config;
15  import org.astrogrid.jes.jobscheduler.locator.RegistryToolLocator.RegistryEndpoint;
16  
17  import java.net.URL;
18  
19  /*** Configuration component that retreives registry endpoint from the configuration.
20   * Used by {@link org.astrogrid.jes.jobscheduler.locator.RegistryToolLocator}
21   * @author Noel Winstanley nw@jb.man.ac.uk 08-Mar-2004
22   * @todo add unit test, fallback registry endpoint..
23   */
24  public class RegistryEndpointFromConfig extends SimpleComponentDescriptor implements RegistryEndpoint {
25      /*** key to look in config for registry endpoint. 
26       * @todo replace by proper constant, once its made public */
27      public static final String REGISTRY_ENDPOINT_KEY = "org.astrogrid.registry.query.endpoint";
28      public RegistryEndpointFromConfig(Config c) {
29          url = c.getUrl(REGISTRY_ENDPOINT_KEY);
30          name="Registry Tool Locator - registry endpoint configuration";
31          description="key: " + REGISTRY_ENDPOINT_KEY
32              + "\nvalue: " + url.toString();
33      }
34      protected final URL url;
35      /***
36       * @see org.astrogrid.jes.jobscheduler.locator.RegistryToolLocator.RegistryEndpoint#getURL()
37       */
38      public URL getURL() {
39          return url;
40      }
41  }
42  
43  
44  /* 
45  $Log: RegistryEndpointFromConfig.java,v $
46  Revision 1.5  2004/07/01 21:15:00  nw
47  added results-listener interface to jes
48  
49  Revision 1.4  2004/03/15 23:45:07  nw
50  improved javadoc
51  
52  Revision 1.3  2004/03/15 01:30:06  nw
53  factored component descriptor out into separate package
54  
55  Revision 1.2  2004/03/15 00:06:57  nw
56  removed SchedulerNotifier interface - replaced references to it by references to JobScheduler interface - identical
57  
58  Revision 1.1  2004/03/08 00:36:34  nw
59  added configuration of registry tool locator to production components
60   
61  */