org.openeai.uuidgen
Class GenericUuid


java.lang.Object

  |

  +--org.openeai.OpenEaiObject

        |

        +--org.openeai.uuidgen.GenericUuid


public class GenericUuid
extends OpenEaiObject

This class is used to either request a UUID (RandomUuid) from the URL specified or generate one locally if errors occur requesting one remotely.

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
See Also:
RandomUuid, Uuid

Field Summary
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
GenericUuid()
          Constructor
GenericUuid(java.lang.String url)
           
 
Method Summary
 java.lang.String getId()
          Returns the UUID currently contained within this object.
 java.lang.String getUrl()
          Returns the URL to be used when requesting a UUID.
 java.lang.String requestId(java.lang.String url)
          Requests a RandomUuid from the supplied URL.
 void setId(java.lang.String id)
          Sets the UUID currently contained within this object.
 void setUrl(java.lang.String url)
          Sets the URL to be used when requesting a UUID.
 
Methods inherited from class org.openeai.OpenEaiObject
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUuid


public GenericUuid()
Constructor


GenericUuid


public GenericUuid(java.lang.String url)
            throws java.io.IOException
Method Detail

getUrl


public java.lang.String getUrl()
Returns the URL to be used when requesting a UUID.

Returns:
String the url

setUrl


public void setUrl(java.lang.String url)
Sets the URL to be used when requesting a UUID.


getId


public java.lang.String getId()
Returns the UUID currently contained within this object.

Returns:
String the UUID

setId


public void setId(java.lang.String id)
Sets the UUID currently contained within this object.

Returns:
String the UUID

requestId


public java.lang.String requestId(java.lang.String url)
                           throws java.net.MalformedURLException,
                                  java.io.IOException
Requests a RandomUuid from the supplied URL.

A UUID will be generated locally if one of the following criteria are met:



Copyright © 2002, OpenEAI Software Foundation