edg.workload.userinterface.jclient
Class Url

java.lang.Object
  extended byedg.workload.userinterface.jclient.Url

public class Url
extends java.lang.Object

Managing Addresses File name: Url.h


Constructor Summary
Url(java.lang.String address)
          constructor by String Parse the string in order to create a valid Url
Url(java.lang.String host, int port)
          constructor by parameters Parse Initialise the host and the port of the Url
 
Method Summary
 java.lang.String getAddress()
          Retrieve the complete Url address
 java.lang.String getHost()
          Retrieve the host
 int getPort()
          Retrieve the port
 java.lang.String getProtocol()
          Retrieve the protocol if present, null otherwise
 java.lang.String getSimpleHost()
          Retrieve the simple host name whithout any additiona info (protocol)
 java.lang.String toString()
          Convert the Url Intance into its string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Url

public Url(java.lang.String address)
    throws java.lang.NumberFormatException,
           java.lang.IllegalArgumentException
constructor by String Parse the string in order to create a valid Url

Parameters:
address - the full address in the form [://]:

Url

public Url(java.lang.String host,
           int port)
constructor by parameters Parse Initialise the host and the port of the Url

Parameters:
host - the host address of this Url
port - the integer port of this Url
Method Detail

toString

public java.lang.String toString()
Convert the Url Intance into its string representation


getAddress

public java.lang.String getAddress()
Retrieve the complete Url address

Returns:
the full address of this Url

getPort

public int getPort()
Retrieve the port

Returns:
the port of this Url

getHost

public java.lang.String getHost()
Retrieve the host

Returns:
the host with its protocol if present

getSimpleHost

public java.lang.String getSimpleHost()
Retrieve the simple host name whithout any additiona info (protocol)

Returns:
the host without its protocol (if is present)

getProtocol

public java.lang.String getProtocol()
Retrieve the protocol if present, null otherwise

Returns:
the protocol if present, null otherwise