org.gridbus.broker.util
Class BrokerUtil

java.lang.Object
  extended by org.gridbus.broker.util.BrokerUtil

public class BrokerUtil
extends java.lang.Object

Author:
krishna

Field Summary
static java.lang.String BROKER_OUTPUT_DIR
          Comment for BROKER_OUTPUT_DIR
static java.lang.String REMOTE_BROKER_OUTPUT_DIR
           
 
Constructor Summary
BrokerUtil()
           
 
Method Summary
static java.lang.String combinePath(java.lang.String[] paths)
          combine list of paths
static java.lang.String combinePath(java.lang.String path1, java.lang.String path2)
          Combines the two input strings to produce a valid path.
static java.lang.String combinePath(java.lang.String path1, java.lang.String path2, java.lang.String pathSeperator)
           
static java.lang.String findClassName(java.lang.String fullName)
          Gets the class name from a fully qualified package.class name.
static java.lang.String getFileName(java.lang.String path)
          Get the last file name of a path
static java.lang.String getHHMMSS(long elapsedTimeMillis)
          Converts a long value (elapsed time) to the format hh:mm:ss:SSS
static java.lang.String getRemoteWorkingDir(java.lang.Object brokerProps)
          Returns the unique remote working directory for this instance of the broker.
static java.lang.String getStagingDir(java.lang.Object brokerProps)
          This is to return the staging directory used by the Dispatchers.
static java.lang.String join(java.lang.String[] array, java.lang.String delim)
           
static java.lang.StringBuffer join(java.lang.String[] array, java.lang.String delim, java.lang.StringBuffer sb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BROKER_OUTPUT_DIR

public static final java.lang.String BROKER_OUTPUT_DIR
Comment for BROKER_OUTPUT_DIR

See Also:
Constant Field Values

REMOTE_BROKER_OUTPUT_DIR

public static final java.lang.String REMOTE_BROKER_OUTPUT_DIR
See Also:
Constant Field Values
Constructor Detail

BrokerUtil

public BrokerUtil()
Method Detail

getHHMMSS

public static java.lang.String getHHMMSS(long elapsedTimeMillis)
Converts a long value (elapsed time) to the format hh:mm:ss:SSS

Parameters:
elapsedTimeMillis - (in milliseconds)
Returns:

findClassName

public static java.lang.String findClassName(java.lang.String fullName)
Gets the class name from a fully qualified package.class name. For example, an input: org.gridbus.broker.MyClass will give output: MyClass

Parameters:
fullName -
Returns:
className

getFileName

public static java.lang.String getFileName(java.lang.String path)
Get the last file name of a path

Parameters:
path -
Returns:

join

public static java.lang.String join(java.lang.String[] array,
                                    java.lang.String delim)
Parameters:
array -
delim -
Returns:

join

public static java.lang.StringBuffer join(java.lang.String[] array,
                                          java.lang.String delim,
                                          java.lang.StringBuffer sb)
Parameters:
array -
delim -
sb -
Returns:

combinePath

public static java.lang.String combinePath(java.lang.String[] paths)
combine list of paths

Parameters:
paths -
Returns:

combinePath

public static java.lang.String combinePath(java.lang.String path1,
                                           java.lang.String path2)
Combines the two input strings to produce a valid path.

Parameters:
path1 -
path2 -
Returns:

combinePath

public static java.lang.String combinePath(java.lang.String path1,
                                           java.lang.String path2,
                                           java.lang.String pathSeperator)
Parameters:
path1 -
path2 -
pathSeperator -
Returns:

getRemoteWorkingDir

public static java.lang.String getRemoteWorkingDir(java.lang.Object brokerProps)
Returns the unique remote working directory for this instance of the broker. This dir is based on the brokerID.

Parameters:
brokerProps -
Returns:

getStagingDir

public static java.lang.String getStagingDir(java.lang.Object brokerProps)
This is to return the staging directory used by the Dispatchers.

Parameters:
brokerProps -
Returns: