Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.activegrid.runtime
Class AGRuntime

    java.lang.Object
      com.activegrid.runtime.AGRuntime

Deprecated. AGRuntime is now deprecated; instead, use `RuntimeAccess`. In a future release, AGRuntime will be removed. Also, note that `RuntimeAccess` uses a different bean name (runtimeAccess).

    @Deprecated
    public class AGRuntime

extends java.lang.Object

Runtime bean. Provides an interface to the session, request and response objects, and other WaveMaker interfaces. This is the primary interface point for any WaveMaker system access. This should only be used as a bean property or through the static `getInstance()` method; other instantiation methods are unsupported. Using it as a bean property is recommended (see `getInstance()` for more information). The AGRuntime bean is named runtime, an example:

     <bean id="myServiceBeanId" class="myServiceBeanClass"
              scope="singleton" lazy-init="true">
       <property name="runtime">
           <ref bean="runtime" />
       </property>
     </bean>

Version:
  $Rev: 29063 $ - $Date: 2010-04-29 17:56:29 -0700 (Thu, 29 Apr 2010) $
Author:
  Matt Small

Constructor Summary
`AGRuntime()` Deprecated. Do not use this constructor; instead, use either `getInstance()` or access this class through bean properties.

Method Summary
`static AGRuntime` | `getInstance()` Deprecated. Statically return the current instance of AGRuntime.
`javax.servlet.http.HttpServletRequest` | `getRequest()` Deprecated. Get the current HttpServletRequest.
`RuntimeAccess` | `getRuntimeAccess()` Deprecated.
`java.lang.Object` | `getService(java.lang.Class<?> serviceType)` Deprecated. Get the service (of the corresponding serviceType).
`java.lang.Object` | `getService(java.lang.String serviceId)` Deprecated. Get the service with the specified service id.
`javax.servlet.http.HttpSession` | `getSession()` Deprecated. Retrieve the current HttpSession.
`void` | `setRuntimeAccess(RuntimeAccess runtimeAccess)` Deprecated.
`static void` | `setRuntimeBean(AGRuntime bean)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AGRuntime

    public AGRuntime()

  Deprecated.
  Do not use this constructor; instead, use either `getInstance()` or access this class through bean properties.

Method Detail

### getInstance

    public static AGRuntime getInstance()

  Deprecated.
  Statically return the current instance of AGRuntime. This depends on the Spring bean being already loaded. This will only return valid values after a request has already been initialized; for this reason, it is inappropriate to use this in a constructor or static initializer. Either call `getInstance()` in your service call, or use a Spring property on your service class to reference the runtime bean. Using a Spring property is recommended.

  Returns:
    The AGRuntime instance.

### setRuntimeBean

    public static void setRuntimeBean(AGRuntime bean)

  Deprecated.

### getSession

    public javax.servlet.http.HttpSession getSession()

  Deprecated.
  Retrieve the current HttpSession. This call is only valid after the request has been initialized.

  Returns:
    The current session (from the request object).

### getRequest

    public javax.servlet.http.HttpServletRequest getRequest()

  Deprecated.
  Get the current HttpServletRequest. This call is only valid after the request has been initialized.

  Returns:
    The current request.

### getService

    public java.lang.Object getService(java.lang.String serviceId)

  Deprecated.
  Get the service with the specified service id.

  Parameters:
    `serviceId` - The service ID to look for.
  Returns:
    The service bean (if a bean with the id exists).
  Throws:
    `AGRuntimeException` - If a bean with the specified id is not found, or if Spring has not yet initialized this bean.

### getService

    public java.lang.Object getService(java.lang.Class<?> serviceType)

  Deprecated.
  Get the service (of the corresponding serviceType). An AGRuntimeException will be thrown if more than one bean matches the serviceType class. It may be better to use `getService(String)`, since the serviceId is guaranteed unique (whereas the service class is not).

  Parameters:
    `serviceType` - The class of the service to search for.
  Returns:
    The service bean.
  Throws:
    `AGRuntimeException` - If a bean with the specified class is not found, more than one bean with the specified class is found, or if Spring has not yet initialized this bean.

### getRuntimeAccess

    public RuntimeAccess getRuntimeAccess()

  Deprecated.

### setRuntimeAccess

    public void setRuntimeAccess(RuntimeAccess runtimeAccess)

  Deprecated.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD