org.apache.wsrp4j.producer.provider.pluto.driver
Class ResourceURLProviderImpl

java.lang.Object
  extended byorg.apache.wsrp4j.producer.provider.pluto.driver.ResourceURLProviderImpl
All Implemented Interfaces:
org.apache.pluto.services.information.ResourceURLProvider

public class ResourceURLProviderImpl
extends java.lang.Object
implements org.apache.pluto.services.information.ResourceURLProvider

Version:
$Id: ResourceURLProviderImpl.java,v 1.6 2005/08/12 12:56:52 cziegeler Exp $

Field Summary
private static java.lang.String CONSTRUCTOR
           
private  DynamicInformationProviderImpl dynInfoProvider
           
private static java.lang.String GET_PROTOCOL_HOST_AND_PORT
           
private  boolean isSecure
           
private  Logger logger
           
private  javax.servlet.http.HttpServletRequest servletRequest
           
private static java.lang.String TO_STRING
           
private  boolean trace_high
           
private  java.lang.String url
           
private  URLComposer urlComposer
           
private  Provider wsrpProvider
           
 
Constructor Summary
ResourceURLProviderImpl(javax.servlet.http.HttpServletRequest aServletRequest, DynamicInformationProviderImpl aProviderImpl, Provider aWsrpProvider, boolean secure)
          Constructs a ResourceURLProviderImpl
 
Method Summary
private  java.lang.String getProtocolHostAndPort()
          Returns the protocol, host and port without trailing "/" as String
 void setAbsoluteURL(java.lang.String path)
          Sets the absolute URL to be returned by the provider.
 void setFullPath(java.lang.String path)
          Sets a full path URI including the context root.
 java.lang.String toString()
          Returns a url to a resource as absolute URL starting with protocol so that it can be accessed by a browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private Logger logger

trace_high

private boolean trace_high

servletRequest

private javax.servlet.http.HttpServletRequest servletRequest

dynInfoProvider

private DynamicInformationProviderImpl dynInfoProvider

urlComposer

private URLComposer urlComposer

wsrpProvider

private Provider wsrpProvider

isSecure

private boolean isSecure

url

private java.lang.String url

CONSTRUCTOR

private static final java.lang.String CONSTRUCTOR
See Also:
Constant Field Values

TO_STRING

private static final java.lang.String TO_STRING
See Also:
Constant Field Values

GET_PROTOCOL_HOST_AND_PORT

private static final java.lang.String GET_PROTOCOL_HOST_AND_PORT
See Also:
Constant Field Values
Constructor Detail

ResourceURLProviderImpl

public ResourceURLProviderImpl(javax.servlet.http.HttpServletRequest aServletRequest,
                               DynamicInformationProviderImpl aProviderImpl,
                               Provider aWsrpProvider,
                               boolean secure)
Constructs a ResourceURLProviderImpl

Parameters:
aServletRequest -
aProviderImpl - - dynamic information provider that creates this instance
aWsrpProvider - - WSRP provider that provides the URL composer
secure - indicator, if a secure URL should be created
Method Detail

setAbsoluteURL

public void setAbsoluteURL(java.lang.String path)
Sets the absolute URL to be returned by the provider. E.g. http://host/wsrp4j/hello.gif

Specified by:
setAbsoluteURL in interface org.apache.pluto.services.information.ResourceURLProvider
Parameters:
path - the new absolute url

setFullPath

public void setFullPath(java.lang.String path)
Sets a full path URI including the context root. E.g. /wsrp4j/hello.gif

Specified by:
setFullPath in interface org.apache.pluto.services.information.ResourceURLProvider
Parameters:
path - the new absolute url

toString

public java.lang.String toString()
Returns a url to a resource as absolute URL starting with protocol so that it can be accessed by a browser.

Specified by:
toString in interface org.apache.pluto.services.information.ResourceURLProvider
Returns:
the URL as string

getProtocolHostAndPort

private java.lang.String getProtocolHostAndPort()
Returns the protocol, host and port without trailing "/" as String



--