com.sun.ts.lib.porting

## Class TSURL

- java.lang.Object
- - com.sun.ts.lib.porting.TSURL

- All Implemented Interfaces:
    TSURLInterface, java.io.Serializable

      public class TSURL
      extends java.lang.Object
      implements TSURLInterface, java.io.Serializable

  This is a Java EE Reference specific implementation of the TSURLInterface which is to be used for Java EE TCK testing. TS tests use this interface to obtain the URL String to use to access a given web component. If a given Java EE Server implmentation requires that URLs be created in a different manner, then this implementation can be replaced.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TSURL()`
    `TSURL(java.lang.String sClassName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getRequest(java.lang.String request)` This method is called by TS tests to get the request string to use to access a given web component.
    `java.net.URL` | `getURL(java.lang.String protocol, java.lang.String host, int port, java.lang.String file)` This method is called by TS tests to get the URL to use to access a given web component.
    `java.lang.String` | `getURLString(java.lang.String protocol, java.lang.String host, int port, java.lang.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 Detail

    - #### TSURL

          public TSURL()

    - #### TSURL

          public TSURL(java.lang.String sClassName)

  - ### Method Detail

    - #### getURL

          public java.net.URL getURL(java.lang.String protocol,
                                     java.lang.String host,
                                     int port,
                                     java.lang.String file)
                              throws java.net.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:
        `java.net.MalformedURLException`

    - #### getURLString

          public java.lang.String getURLString(java.lang.String protocol,
                                               java.lang.String host,
                                               int port,
                                               java.lang.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 java.lang.String getRequest(java.lang.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.