com.sun.sgs.app
Class AppContext

java.lang.Object
  extended by com.sun.sgs.app.AppContext

public final class AppContext
extends Object

Provides access to facilities available in the current application context. The AppContext uses the InternalContext to retrieve managers via its ManagerLocator. This class should not be instantiated.


Method Summary
static ChannelManager getChannelManager()
          Returns the ChannelManager for use by the current application.
static DataManager getDataManager()
          Returns the DataManager for use by the current application.
static
<T> T
getManager(Class<T> type)
          Returns a manager of the specified type for use by the current application.
static TaskManager getTaskManager()
          Returns the TaskManager for use by the current application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChannelManager

public static ChannelManager getChannelManager()
Returns the ChannelManager for use by the current application. The object returned is not serializable, and should not be stored as part of a managed object.

Returns:
the ChannelManager for the current application
Throws:
ManagerNotFoundException - if the ChannelManager cannot be located

getDataManager

public static DataManager getDataManager()
Returns the DataManager for use by the current application. The object returned is not serializable, and should not be stored as part of a managed object.

Returns:
the DataManager for the current application
Throws:
ManagerNotFoundException - if the DataManager cannot be located

getTaskManager

public static TaskManager getTaskManager()
Returns the TaskManager for use by the current application. The object returned is not serializable, and should not be stored as part of a managed object.

Returns:
the TaskManager for the current application
Throws:
ManagerNotFoundException - if the TaskManager cannot be located

getManager

public static <T> T getManager(Class<T> type)
Returns a manager of the specified type for use by the current application. The object returned is not serializable, and should not be stored as part of a managed object.

Type Parameters:
T - the type of the manager
Parameters:
type - a class representing the type of the manager
Returns:
the manager of the specified type for the current application
Throws:
ManagerNotFoundException - if no manager is found for the specified type

Project Darkstar, Version 0.9.9.6
2009-05-08 15:39:40

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