edg.workload.userinterface.jclient
Class JobId

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

public class JobId
extends java.lang.Object


Constructor Summary
JobId()
          Instantiates an empty JobId object
JobId(java.lang.String jid)
          Instantiates a JobId object from the passed dg_jobId in String format.
JobId(Url lbAddress, java.lang.String unique)
          Intantiates a JobId object providing full information: LB server address and unique string
 
Method Summary
 void clear()
          Unsets the JobId instance.
 boolean equals(JobId jid)
          Check if the job identifiers are equals
 void fromString(java.lang.String jid)
          Set the JobId instance from the String given as input.
 Url getServer()
           
 java.lang.String getUnique()
           
 boolean isSet()
          Check whether the jobId has been already created (true) or not (false)
 void setJobId(Url lbServer)
          Set the JobId instance from the dg_jobId in String format given as input.
 java.lang.String toString()
          Converts the jobId into a String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobId

public JobId()
Instantiates an empty JobId object


JobId

public JobId(Url lbAddress,
             java.lang.String unique)
Intantiates a JobId object providing full information: LB server address and unique string

Parameters:
lbAddress - the Logging and Bookkeeping server address

JobId

public JobId(java.lang.String jid)
      throws java.lang.IllegalArgumentException,
             java.lang.NumberFormatException
Instantiates a JobId object from the passed dg_jobId in String format.

Parameters:
jid - a String representig a classAd expression
Throws:
java.lang.IllegalArgumentException - - When the String is passed in a wrong format
java.lang.NumberFormatException - Unable to find the integer LB server port number inside the jobid
Method Detail

equals

public boolean equals(JobId jid)
Check if the job identifiers are equals

Parameters:
jid - the JobId instance to check for equality
Returns:
true if the job identifiers are the same, false otherwise

clear

public void clear()
Unsets the JobId instance. Clear all it's memebers


isSet

public boolean isSet()
Check whether the jobId has been already created (true) or not (false)

Returns:
true (jobId created) or false (jobId not yet created)

toString

public java.lang.String toString()
Converts the jobId into a String

Returns:
a string representing the job identifiers (if set), null otherwise

fromString

public void fromString(java.lang.String jid)
                throws java.lang.IllegalArgumentException,
                       java.lang.NumberFormatException
Set the JobId instance from the String given as input.

Parameters:
jid - the job identifier string representation
Throws:
java.lang.IllegalArgumentException - Wrong jobId format
java.lang.NumberFormatException - Unable to find the integer LB server port number inside the jobid

setJobId

public void setJobId(Url lbServer)
              throws java.lang.RuntimeException
Set the JobId instance from the dg_jobId in String format given as input.

Parameters:
lbServer - An Url instance representing the LB address
Throws:
RunTimeException - unable to create a JobId
java.lang.RuntimeException

getServer

public Url getServer()
              throws java.lang.NoSuchFieldException
Returns:
the LB address into its String format
Throws:
java.lang.NoSuchFieldException - If the jobId has not been initialised yet

getUnique

public java.lang.String getUnique()
                           throws java.lang.NoSuchFieldException
Returns:
the unique String into its String format
Throws:
chFieldException - If the jobId has not been initialised yet
java.lang.NoSuchFieldException