org.openmobileis.common.context
Class ApplicationContext

java.lang.Object
  extended byorg.openmobileis.common.context.ApplicationContext

public class ApplicationContext
extends java.lang.Object

Application Context are use to share application specific data between application objects. Context is not persistent. The application context can be access using the ApplicationContextManager class.

Since:
JDK 1.1
Version:
1.0
Author:
Philippe Delrieu, Philippe Delrieu

Constructor Summary
ApplicationContext()
           
 
Method Summary
 void addObject(java.lang.String objectName, java.lang.Object object)
          add the object with specified name to the context
 java.lang.String[] getApplicationExecParameters()
          return the application arguments if initialized
 java.lang.Object getObject(java.lang.String objectName)
          return the application context with specified name
 java.util.Set getObjectNames()
          return objects'keys in the context Map
 Plateform getPlateform()
          return the plateform description of the hardware where the application is executed.
 void removeObject(java.lang.String objectName)
          remove the specified object name from the context
 void setApplicationExecArguments(java.lang.String[] args)
          set the application arguments
 void setPlateform(Plateform plateform)
          set the plateform description of the hardware where the application is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationContext

public ApplicationContext()
Method Detail

addObject

public void addObject(java.lang.String objectName,
                      java.lang.Object object)
add the object with specified name to the context

Parameters:
objectName - : object name
object - : object added to the context.

removeObject

public void removeObject(java.lang.String objectName)
remove the specified object name from the context

Parameters:
objectName - : object name to remove

getObject

public java.lang.Object getObject(java.lang.String objectName)
return the application context with specified name

Parameters:
objectName - : object name to return
Returns:
return the object with specified object name or null if not found.

getApplicationExecParameters

public java.lang.String[] getApplicationExecParameters()
return the application arguments if initialized

Returns:
return the application parameters if initialized

setApplicationExecArguments

public void setApplicationExecArguments(java.lang.String[] args)
set the application arguments


getPlateform

public Plateform getPlateform()
return the plateform description of the hardware where the application is executed. By default the DefaultPlateform instance is return.

Returns:

setPlateform

public void setPlateform(Plateform plateform)
set the plateform description of the hardware where the application is executed. If not set, by default the DefaultPlateform instance is set.

Returns:

getObjectNames

public java.util.Set getObjectNames()
return objects'keys in the context Map

Returns:


Copyright 2006 OpenMobileIS. All Rights Reserved.