org.jboss.services.binding
Interface URLServiceBindingValueSource

All Superinterfaces:
ServiceBindingValueSource
All Known Implementing Classes:
StringReplacementServiceBindingValueSourceImpl, XSLTServiceBindingValueSourceImpl

public interface URLServiceBindingValueSource
extends ServiceBindingValueSource

A ServiceBindingValueSource that returns a URL or a String representation of one.

Typical usage is in file transformation operations, where the content of a given input URL or classpath resource is read, transformed, written to a temp file, and the URL of the temp file returned.

Version:
$Revision: 85945 $
Author:
Brian Stansberry

Method Summary
 String getResourceServiceBindingValue(ServiceBinding binding, String input)
          Returns a String representation of a URL path to use for the binding value.
 URL getURLServiceBindingValue(ServiceBinding binding, URL input)
          Returns the URL to use for the binding value.
 
Methods inherited from interface org.jboss.services.binding.ServiceBindingValueSource
getServiceBindingValue
 

Method Detail

getURLServiceBindingValue

URL getURLServiceBindingValue(ServiceBinding binding,
                              URL input)
Returns the URL to use for the binding value.

Parameters:
binding - the binding. Cannot be null
input - the URL to use as input data
Returns:
a URL to use as the binding value. Will not return null.

getResourceServiceBindingValue

String getResourceServiceBindingValue(ServiceBinding binding,
                                      String input)
Returns a String representation of a URL path to use for the binding value.

Parameters:
binding - the binding. Cannot be null
input - either a String representation of a URL or a value that can be passed to ClassLoader.getResourceAsStream(String)
Returns:
a filesystem path to use as the binding value. May return null.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.