com.sun.grid.jgdi.management

## Class JGDISession

- java.lang.Object
- - com.sun.grid.jgdi.management.JGDISession

-     public class JGDISession
      extends java.lang.Object

  Session for a JMX connection to JGDI

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close this jgdi session
    `static void` | `closeAllSessions()` Close all jgdi sessions
    `static JGDISession` | `closeSession(long sessionId)` Close a jgdi session.
    `static JGDISession` | `createNewSession(long sessionId, java.lang.String url)` Create a new jgdi session
    `static JGDISession` | `getCurrentSession()` Get the jgdi session from the security context
    `long` | `getId()` get the id of the session
    `JGDI` | `getJGDI()` Get the jgdi object of this session
    `NotificationBridge` | `getNotificationBridge()` Get the notification bridge of this session
    `boolean` | `isClosed()` is this session already closed

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getJGDI

          public JGDI getJGDI()
                       throws JGDIException

      Get the jgdi object of this session
      Returns:
        the jgdi object
      Throws:
        `JGDIException` - if the jgdi object could not be created

    - #### getNotificationBridge

          public NotificationBridge getNotificationBridge()

      Get the notification bridge of this session
      Returns:
        the notification brigde

    - #### close

          public void close()

      Close this jgdi session

    - #### isClosed

          public boolean isClosed()

      is this session already closed
      Returns:
        `true` if this session is already closed

    - #### getCurrentSession

          public static JGDISession getCurrentSession()
                                               throws JGDIException

      Get the jgdi session from the security context
      Returns:
        the current jgdi session
      Throws:
        `JGDIException` - new jgdi session has been found in the security context

    - #### closeSession

          public static JGDISession closeSession(long sessionId)

      Close a jgdi session.
      Parameters:
        `sessionId` - id of the session
      Returns:
        the closed session object or `null` if the session does not exist or if the session has been already closed

    - #### createNewSession

          public static JGDISession createNewSession(long sessionId,
                                                     java.lang.String url)

      Create a new jgdi session
      Parameters:
        `sessionId` - id of the session
        `url` - jgdi connection url
      Returns:
        the new session or `null` if a session with this id already exists

    - #### closeAllSessions

          public static void closeAllSessions()

      Close all jgdi sessions

    - #### getId

          public long getId()

      get the id of the session
      Returns:
        the id of the session

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