com.sun.grid.jgdi
Class JGDIFactory

java.lang.Object
  extended by com.sun.grid.jgdi.JGDIFactory

public class JGDIFactory
extends java.lang.Object

Factory class for JGDI objects.

See Also:
com.sun.grid.jgdi.JGDI

Constructor Summary
JGDIFactory()
           
 
Method Summary
static EventClientImpl createEventClient(java.lang.String url, int evcId)
          Create a new event client which receives events from a jgdi connection.
static java.lang.String getJGDIVersion()
          return the jgdi shared library version string, e.g.
static JGDI newInstance(java.lang.String url)
          Get a new instance of a JGDI object.
static JGDIProxy newJMXInstance(java.lang.String host, int port, java.lang.Object credentials)
          Create a proxy object to the JGDI MBean.
static JGDI newSynchronizedInstance(java.lang.String url)
          Get a synchronized instance of a JGDI object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGDIFactory

public JGDIFactory()
Method Detail

newInstance

public static JGDI newInstance(java.lang.String url)
                        throws JGDIException
Get a new instance of a JGDI object.

Parameters:
url - JGDI connection url in the form bootstrap://<SGE_ROOT>@<SGE_CELL>:<SGE_QMASTER_PORT>
Returns:
the JGDI instance
Throws:
JGDIException - on any error on the GDI layer

newSynchronizedInstance

public static JGDI newSynchronizedInstance(java.lang.String url)
                                    throws JGDIException
Get a synchronized instance of a JGDI object.

Parameters:
url - JGDI connection url in the form bootstrap://<SGE_ROOT>@<SGE_CELL>:<SGE_QMASTER_PORT>
Returns:
the JGDI instance
Throws:
JGDIException - on any error on the GDI layer
Since:
0.91

createEventClient

public static EventClientImpl createEventClient(java.lang.String url,
                                                int evcId)
                                         throws JGDIException
Create a new event client which receives events from a jgdi connection.

Parameters:
url - JGDI connection url in the form bootstrap://<SGE_ROOT>@<SGE_CELL>:<SGE_QMASTER_PORT>
evcId - id of the event client (0 mean dynamically assigned)
Returns:
the new event client
Throws:
JGDIException

getJGDIVersion

public static java.lang.String getJGDIVersion()
return the jgdi shared library version string, e.g. 'GE maintrunk' or 'GE 6.1u1'

Returns:
the jgdi shared library version string

newJMXInstance

public static JGDIProxy newJMXInstance(java.lang.String host,
                                       int port,
                                       java.lang.Object credentials)
Create a proxy object to the JGDI MBean.

Parameters:
host - the qmaster host
port - port where qmasters MBeanServer is listening
credentials - credentials for authentication
Returns:
the JGDI Proxy object


Copyright © 2007 Sun Microsystems, Inc. All rights reserved.