org.apache.wsrp4j.consumer.app.driver
Class URLGeneratorImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.app.driver.URLGeneratorImpl
All Implemented Interfaces:
URLGenerator

public class URLGeneratorImpl
extends java.lang.Object
implements URLGenerator

This class implements the URLGenerator-interface providing methods to query the consumer's urls.

Version:
$Id: URLGeneratorImpl.java,v 1.4 2005/08/11 13:02:02 cziegeler Exp $
Author:
Stefan Behl

Field Summary
private  java.lang.StringBuffer appURL
           
private  java.util.Map consumerParameters
           
private static URLGeneratorImpl instance
           
private  Logger logger
           
private  java.lang.String url
           
 
Constructor Summary
private URLGeneratorImpl(java.lang.String url, java.util.Map consumerParameters)
           
 
Method Summary
 java.lang.String getBlockingActionURL(java.util.Map params)
          Creates a URL pointing to the consumer,triggering a performBlockingInteraction call.
static URLGenerator getInstance(java.lang.String url, java.util.Map consumerParameters)
           
 java.lang.String getNamespacedToken(java.lang.String token)
          Creates a 'url' that the consumer can use to namespace tokens.
private  java.lang.String getParameterString(java.util.Map params)
           
 java.lang.String getRenderURL(java.util.Map params)
          Creates a URL pointing to the consumer,triggering a getMarkup call.
 java.lang.String getResourceURL(java.util.Map params)
          Creates a URL pointing to the consumer,triggering the consumer to fetch a certain resource
 void setConsumerParameters(java.util.Map consumerParameters)
           
 void setConsumerURL(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static URLGeneratorImpl instance

appURL

private java.lang.StringBuffer appURL

url

private java.lang.String url

consumerParameters

private java.util.Map consumerParameters

logger

private Logger logger
Constructor Detail

URLGeneratorImpl

private URLGeneratorImpl(java.lang.String url,
                         java.util.Map consumerParameters)
Method Detail

getInstance

public static URLGenerator getInstance(java.lang.String url,
                                       java.util.Map consumerParameters)

setConsumerURL

public void setConsumerURL(java.lang.String url)

setConsumerParameters

public void setConsumerParameters(java.util.Map consumerParameters)

getBlockingActionURL

public java.lang.String getBlockingActionURL(java.util.Map params)
Description copied from interface: URLGenerator
Creates a URL pointing to the consumer,triggering a performBlockingInteraction call.

Specified by:
getBlockingActionURL in interface URLGenerator
Parameters:
params - A map with all parameters which should be appended to the URL.
Returns:
a blockingInteraction URL

getRenderURL

public java.lang.String getRenderURL(java.util.Map params)
Description copied from interface: URLGenerator
Creates a URL pointing to the consumer,triggering a getMarkup call.

Specified by:
getRenderURL in interface URLGenerator
Parameters:
params - A map with all parameters which should be appended to the URL.
Returns:
a getMarkup URL

getResourceURL

public java.lang.String getResourceURL(java.util.Map params)
Description copied from interface: URLGenerator
Creates a URL pointing to the consumer,triggering the consumer to fetch a certain resource

Specified by:
getResourceURL in interface URLGenerator
Parameters:
params - A map with all parameters which should be appended to the URL.
Returns:
a resource URL

getNamespacedToken

public java.lang.String getNamespacedToken(java.lang.String token)
Description copied from interface: URLGenerator
Creates a 'url' that the consumer can use to namespace tokens.

Specified by:
getNamespacedToken in interface URLGenerator
Returns:
a prefix which ca nbe used to namespace tokens.

getParameterString

private java.lang.String getParameterString(java.util.Map params)


--