View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/filestore/client/src/java/org/astrogrid/filestore/resolver/FileStoreEndpointResolver.java,v $</cvs:source>
3    * <cvs:author>$Author: jdt $</cvs:author>
4    * <cvs:date>$Date: 2004/11/25 00:19:21 $</cvs:date>
5    * <cvs:version>$Revision: 1.6 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: FileStoreEndpointResolver.java,v $
9    *   Revision 1.6  2004/11/25 00:19:21  jdt
10   *   Merge from dave-dev-200410061224-200411221626
11   *
12   *   Revision 1.5.14.1  2004/10/19 14:56:15  dave
13   *   Refactored config and resolver to enable multiple instances of mock implementation.
14   *   Required to implement handling of multiple FileStore(s) in FileManager.
15   *
16   * </cvs:log>
17   *
18   */
19  package org.astrogrid.filestore.resolver ;
20  
21  import java.net.URL ;
22  import java.net.MalformedURLException ;
23  
24  import org.astrogrid.store.Ivorn ;
25  import org.astrogrid.registry.RegistryException;
26  import org.astrogrid.registry.client.RegistryDelegateFactory ;
27  import org.astrogrid.registry.client.query.RegistryService ;
28  
29  import org.astrogrid.filestore.common.ivorn.FileStoreIvornParser ;
30  import org.astrogrid.filestore.common.ivorn.FileStoreIvornFactory ;
31  
32  import org.astrogrid.filestore.common.exception.FileStoreIdentifierException ;
33  
34  
35  /***
36   * Public interface for a helper class to resolve an Ivron into a service endpoint.
37   *
38   */
39  public interface FileStoreEndpointResolver
40      {
41  
42      /***
43       * Resolve an Ivorn into a service endpoint.
44       * @param ivorn An Ivorn containing a filestore identifier.
45       * @return The endpoint address for the service.
46       * @throws FileStoreIdentifierException If the identifier is not valid.
47       * @throws FileStoreResolverException If unable to resolve the identifier.
48       *
49       */
50      public URL resolve(Ivorn ivorn)
51          throws FileStoreIdentifierException, FileStoreResolverException ;
52  
53      /***
54       * Resolve an Ivorn parser into a service endpoint.
55       * @param parser A FileStoreIvornParser containing the Filestore identifier.
56       * @return The endpoint address for the service.
57       * @throws FileStoreIdentifierException If the identifier is not valid.
58       * @throws FileStoreResolverException If unable to resolve the identifier.
59       *
60       */
61      public URL resolve(FileStoreIvornParser parser)
62          throws FileStoreIdentifierException, FileStoreResolverException ;
63  
64      }
65