com.xenonsoft.bridgetown.resources
Interface IConfigLoader

All Known Implementing Classes:
AbstractConfigLoader, AbstractConfigLoader

public interface IConfigLoader

Contract interface for service assembly configuration loader. This interface decouples loading the configuration from actual management of the assembly.

Version:
$Id: IConfigLoader.java,v 1.1.1.1 2004/09/04 12:04:33 peter_pilgrim Exp $
Author:
Peter Pilgrim, 04-Aug-2004

Method Summary
 AssemblyConfig load()
          Loads the service assembly configuration from the supplied resource.
 AssemblyConfig load(java.io.File file)
          Loads the service assembly configuration path from the specified URL
 AssemblyConfig load(java.io.InputStream inputStream)
          Loads the service assembly configuration path from the specified URL
 AssemblyConfig load(java.lang.String uri)
          Loads the service assembly configuration path from the specified URL
 void setFile(java.io.File file)
          Set the system file for the service assembly configuration
 void setInputStream(java.io.InputStream inputStream)
          Set the input stream for the service assembly configuration
 void setUri(java.lang.String uri)
          Set the URI path for the service assembly configuration
 

Method Detail

setUri

public void setUri(java.lang.String uri)
Set the URI path for the service assembly configuration

Parameters:
uri -
Returns:

setFile

public void setFile(java.io.File file)
Set the system file for the service assembly configuration

Returns:

setInputStream

public void setInputStream(java.io.InputStream inputStream)
Set the input stream for the service assembly configuration

Returns:

load

public AssemblyConfig load()
Loads the service assembly configuration from the supplied resource.
  1. The implementation checks for existance of an InputStream, if it is found, and the stream is opened and available, then method uses the stream.
  2. If the File exists, then the method loads the configuration from the system file.
  3. Finally the implementation tries to load the configuration URI path. It constructs an URL and attempts to retrieve stream from the resource.

Returns:
Assembly configuration root
Throws:
AssemblyConfigException - if the configuration fails to load

load

public AssemblyConfig load(java.lang.String uri)
Loads the service assembly configuration path from the specified URL

Returns:
Assembly configuration object data graph
Throws:
AssemblyConfigException - if the configuration fails to load

load

public AssemblyConfig load(java.io.File file)
Loads the service assembly configuration path from the specified URL

Returns:
Assembly configuration object data graph
Throws:
AssemblyConfigException - if the configuration fails to load

load

public AssemblyConfig load(java.io.InputStream inputStream)
Loads the service assembly configuration path from the specified URL

Returns:
Assembly configuration object data graph
Throws:
AssemblyConfigException - if the configuration fails to load


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.