Package com.sun.ts.lib.porting.implementation

# Class SunRIURL

java.lang.Object
com.sun.ts.lib.porting.implementation.SunRIURL

All Implemented Interfaces:
  `TSURLInterface`

public class SunRIURL extends Object implements TSURLInterface
This is a J2EE Reference specific implementation of the TSURLInterface which is to be used for J2EE-TS testing. TS tests use this interface to obtain the URL String to use to access a given web component. If a given J2EE Server implmentation requires that URLs be created in a different manner, then this implementation can be replaced.

Author:
  Kyle Grucci

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SunRIURL()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getRequest(String request)`
  This method is called by TS tests to get the request string to use to access a given web component.
  `URL`
  `getURL(String protocol, String host, int port, String file)`
  This method is called by TS tests to get the URL to use to access a given web component.
  `String`
  `getURLString(String protocol, String host, int port, String file)`
  This method is called by TS tests to get the URL to use to access a given web component.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SunRIURL

    public SunRIURL()

- ## Method Details

  - ### getURL

    public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException
    This method is called by TS tests to get the URL to use to access a given web component.
    Specified by:
      `getURL` in interface `TSURLInterface`
    Parameters:
      `protocol` - - the name of the protocol.
      `host` - - the name of the host.
      `port` - - the port number.
      `file` - - the host file.
    Returns:
      a valid URL object.
    Throws:
      `MalformedURLException`

  - ### getURLString

    public String getURLString(String protocol, String host, int port, String file)
    This method is called by TS tests to get the URL to use to access a given web component.
    Specified by:
      `getURLString` in interface `TSURLInterface`
    Parameters:
      `protocol` - - the name of the protocol.
      `host` - - the name of the host.
      `port` - - the port number.
      `file` - - the host file.
    Returns:
      a valid URL as a String.

  - ### getRequest

    public String getRequest(String request)
    This method is called by TS tests to get the request string to use to access a given web component.
    Specified by:
      `getRequest` in interface `TSURLInterface`
    Parameters:
      `request` - - the request file.
    Returns:
      a valid String object.