com.sun.media.jsdt
Class URLString

java.lang.Object
  |
  +--com.sun.media.jsdt.impl.JSDTObject
        |
        +--com.sun.media.jsdt.URLString

public class URLString
extends com.sun.media.jsdt.impl.JSDTObject

JSDT URL String parsing class. A JSDT URL is of the form:

     jsdt://<host>:<port>/<connection type>/<object type>/<object name>

 where  is the connection (or implementation) type 
 (eg. "socket", "lrmp" or "rmi"),
 and where valid object types are "Session" and "Client".

 So for example:
     bind("jsdt://stard:3355/socket/Session/chatSession", chatSession);

     bind("jsdt://stard:4386/socket/Client/fredClient", fredClient);
 
Static convenience methods are provided to create Session and Client URLStrings

Since:
JSDT 1.5
Version:
1.5 - 19th April 1999
Author:
Rich Burridge
See Also:
Serialized Form

Fields inherited from class com.sun.media.jsdt.impl.JSDTObject
giveTime, httpTunnelPort, maxQueueSize, maxThreadPoolSize, pingPeriod, registryAddress, registryPort, registryTime, showMessage, showStack, socketFactoryClass, SSLCipher, timeoutPeriod, TTL, versionString
 
Constructor Summary
URLString(java.lang.String url)
           URLString is a constructor for the URLString class.
 
Method Summary
static URLString createClientURL(java.lang.String hostName, int port, java.lang.String connectionType, java.lang.String clientName)
           createClientURL is a class method that will create a JSDT Client URL given it's component parts.
static URLString createSessionURL(java.lang.String hostName, int port, java.lang.String connectionType, java.lang.String sessionName)
           createSessionURL is a class method that will create a JSDT Session URL given it's component parts.
 java.lang.String getConnectionType()
           getConnectionType get the connection type of this Session/Client.
 java.lang.String getHostAddress()
           getHostAddress get the host IP address for the server for this object.
 java.lang.String getHostName()
           getHostName get the host name for the server for this object.
 java.lang.String getObjectName()
           getObjectName get the name of this object.
 java.lang.String getObjectType()
           getObjectType get the type of this object (Session or Client).
 int getPort()
           getPort get the port number being used by the server for this object.
 java.lang.String getProtocol()
           getProtocol get the protocol portion of the given URL String.
 boolean isValid()
           isValid get the validity of this URLString.
 java.lang.String toString()
           toString print this URLString object as a JSDT String URL.
 
Methods inherited from class com.sun.media.jsdt.impl.JSDTObject
error, setConnectionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLString

public URLString(java.lang.String url)
URLString is a constructor for the URLString class. The URLString constructor takes a JSDT URL String and divides it up into its component parts.
Parameters:
url - the JSDT URL string to be broken down.
Method Detail

createSessionURL

public static URLString createSessionURL(java.lang.String hostName,
                                         int port,
                                         java.lang.String connectionType,
                                         java.lang.String sessionName)
createSessionURL is a class method that will create a JSDT Session URL given it's component parts. This URL can then be used in conjunction with the createSession methods in the SessionFactory class.
Parameters:
hostName - the host name for the server for this Session.
port - the port number the server is running on.
connectionType - the connection (implementation) type of this Session.
sessionName - the name of this Session.
Since:
JSDT 1.5

createClientURL

public static URLString createClientURL(java.lang.String hostName,
                                        int port,
                                        java.lang.String connectionType,
                                        java.lang.String clientName)
createClientURL is a class method that will create a JSDT Client URL given it's component parts. This URL can then be used in conjunction with the createClient method in the ClientFactory class.
Parameters:
hostName - the host name for the server for this Client.
port - the port number the server is running on.
connectionType - the connection (implementation) type of this Client.
clientName - the name of this Client.
Since:
JSDT 1.5

getHostAddress

public java.lang.String getHostAddress()
getHostAddress get the host IP address for the server for this object.
Returns:
the host IP address of the server for this object.

getHostName

public java.lang.String getHostName()
getHostName get the host name for the server for this object.
Returns:
the host name of the server for this object.

getProtocol

public java.lang.String getProtocol()
getProtocol get the protocol portion of the given URL String.
Returns:
the port portion of the given URL String.

getPort

public int getPort()
getPort get the port number being used by the server for this object.
Returns:
the port number being used by the server for this object.

getConnectionType

public java.lang.String getConnectionType()
getConnectionType get the connection type of this Session/Client.
Returns:
the connection type of this Session/Client.
Overrides:
getConnectionType in class com.sun.media.jsdt.impl.JSDTObject

getObjectType

public java.lang.String getObjectType()
getObjectType get the type of this object (Session or Client).
Returns:
the type of this object (Session or client).

getObjectName

public java.lang.String getObjectName()
getObjectName get the name of this object.
Returns:
the name of this object.

isValid

public boolean isValid()
isValid get the validity of this URLString.
Returns:
an indication of whether this URLString is valid.

toString

public java.lang.String toString()
toString print this URLString object as a JSDT String URL.
Returns:
this URLString object as a JSDT String URL.
Overrides:
toString in class java.lang.Object
Since:
JSDT 1.5