Oracle Application Server Wireless Java API Reference
B14043-01


oracle.edge.common
Interface EdgeExtensionContext


public interface EdgeExtensionContext

This is the interface for the contextual information related to the edge server's extension objects. A concrete object implementing this interface would be given to the EdgeExtension so that the extension object can have access to the context, for example, the extension's own name et al and possibly other states stored inside the context by the extension.


Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
          Return the attribute object bound for the given attribute name.
 EdgeExtensionContext getContext(java.lang.String extName, int extType)
          Return the extension context for the extension with the given type and given extension name.
 java.lang.String getDescription()
          Return the description of the extension instance.
 java.lang.String getEdgeServerName()
          Return the name for the current edge server running the extension object.
 java.lang.String getName()
          Return the name of the extension instance.
 ConfigParameter getParameter(java.lang.String paramName)
          Returns the configuration parameter information for the edge extension object.
 java.lang.String getSiteName()
          Return the site name for the current edge server running the extension object.
 java.lang.String getVersion()
          Return the version of the extension instance.
 void logError(java.lang.String msg)
          Log an error message to the log for edge server.
 void logError(java.lang.String msg, java.lang.Throwable t)
          Log an error message and exception stack trace to the log for edge server.
 void logNotification(java.lang.String msg)
          Log a notification(debugging, e.g.) message to the log for edge server.
 void logWarning(java.lang.String msg)
          Log a warning message to the log for edge server.
 void setAttribute(java.lang.String attributeName, java.lang.Object attribute)
          Binds the attribute object to the given attribute name.

 

Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
Return the attribute object bound for the given attribute name.
Parameters:
attributeName - The attribute name. Can not be null!
Returns:
The attribute object found that's bound for the given attribute name. Or null if not found!

getContext

public EdgeExtensionContext getContext(java.lang.String extName,
                                       int extType)
Return the extension context for the extension with the given type and given extension name.
Parameters:
extName - The extension name. It can not be null.
extType - The extension type. The valid values can be found from oracle.edge.common.EdgeExtension.
Returns:
The extension context for the extension with the given type and name.
See Also:
EdgeExtension

getDescription

public java.lang.String getDescription()
Return the description of the extension instance.
Returns:
the name of the extension instance.

getEdgeServerName

public java.lang.String getEdgeServerName()
Return the name for the current edge server running the extension object.
Returns:
the name for the edge server owning the extensin object.

getName

public java.lang.String getName()
Return the name of the extension instance. For example, for devices/filters, this is the identifier string assigned to the device/filter during configuration. This can be used for dispatching event from the extension.
Returns:
the name of the extension instance.

getParameter

public ConfigParameter getParameter(java.lang.String paramName)
Returns the configuration parameter information for the edge extension object.
Parameters:
paramName - the name of the parameter. Can not be null!
Returns:
the configuration parameter information for the edge extension object. Or null if not found!

getSiteName

public java.lang.String getSiteName()
Return the site name for the current edge server running the extension object.
Returns:
the site name for the current edge server running the extension object.

getVersion

public java.lang.String getVersion()
Return the version of the extension instance. For example, for devices/filters, this is the version string assigned to the device/filter during configuration.
Returns:
the name of the extension instance.

logError

public void logError(java.lang.String msg)
Log an error message to the log for edge server.
Parameters:
msg - the error message.

logError

public void logError(java.lang.String msg,
                     java.lang.Throwable t)
Log an error message and exception stack trace to the log for edge server.
Parameters:
msg - the error message.
t - the exception/error.

logNotification

public void logNotification(java.lang.String msg)
Log a notification(debugging, e.g.) message to the log for edge server.

Note, the log level has to be set to "notify" to view this error in the log.

Parameters:
msg - the notification message.

logWarning

public void logWarning(java.lang.String msg)
Log a warning message to the log for edge server.

Note, the log level has to be set to "notify" or "warning" to view this error in the log.

Parameters:
msg - the warning message.

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object attribute)
Binds the attribute object to the given attribute name.
Parameters:
attributeName - The name of the attribute. It can not be null.
attribute - The attribute object.

Note: If either the attributeName or the attribute is null, this method call is a no-op!.


Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.