hamsam.api
Class URLComponent

java.lang.Object
  |
  +--hamsam.api.URLComponent
All Implemented Interfaces:
MessageComponent

public class URLComponent
extends java.lang.Object
implements MessageComponent

A component to represent URLs in instant messages. A URL is special in that clients may want to show it as a "web link" rather than plain text. The URL component allows this by providing a link text and link URL. The link text is plain text that needs to be displayed to the user, while the link URL is a URL to which the user may connect to.


Constructor Summary
URLComponent(java.lang.String linkText, java.net.URL linkURL)
          Construct a url component with a link text and link url.
 
Method Summary
 java.lang.String getLinkText()
          Returns the link text asociated with this URL component.
 java.net.URL getLinkURL()
          Returns the link URL asociated with this URL component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLComponent

public URLComponent(java.lang.String linkText,
                    java.net.URL linkURL)
Construct a url component with a link text and link url.

Parameters:
linkText - the link text for this component.
linkURL - the link URL for this component.
Method Detail

getLinkText

public java.lang.String getLinkText()
Returns the link text asociated with this URL component.

Returns:
the link text of this URL component.

getLinkURL

public java.net.URL getLinkURL()
Returns the link URL asociated with this URL component.

Returns:
the link URL of this URL component.