FileDocCategorySizeDatePackage
ComponentMessageHolder.javaAPI DocGlassfish v2 API8613Fri May 04 22:30:28 BST 2007com.sun.enterprise.jbi.serviceengine.util

ComponentMessageHolder

public class ComponentMessageHolder extends Object
This provides necessary methods for the components to pass the task result data to ManagemntMessageBuilder. ManagementMessageBuilder constructs an XML document based on this.
author
bhavanishankar@dev.java.net.

Fields Summary
private String
mMsgTypeToBuild
Type of message to build. Currently it can either be 'Status' or 'Exception'
private HashMap
mLocTokenCache
Cache for Localized Tokens
private HashMap
mLocMessageCache
Cache for Localized Tokens
private HashMap
mLocParamCache
Cache for Localized Tokens
private Throwable
mExceptionObject
Exception Object
private String
mTaskName
task name
private String
mTaskResult
task result
private String
mStatusMsgType
status message type
private String
mExceptionMsgType
exception message type
private String
mComponentName
component name
Constructors Summary
public ComponentMessageHolder(String msgType)
Creates a new instance of MessageContentHolder with a message type.

param
msgType String describing the message type to build.


                            
       
        mMsgTypeToBuild = msgType;
    
Methods Summary
public java.lang.StringgetComponentMessageType()
Get the type(status, exception) of message to be built for this component.

return
Task Result.

        return mMsgTypeToBuild;
    
public java.lang.StringgetComponentName()
Return the name of the component.

return
component name.

        return mComponentName;
    
public java.lang.StringgetExceptionMessageType()
Get the exception message type being returned by the component.

return
Status message type.

        return mExceptionMsgType;
    
public java.lang.ThrowablegetExceptionObject()
Get the exception object being thrown by this component.

return
Exception Object.

        return mExceptionObject;
    
public java.lang.StringgetLocMessage(int nestingLevel)
Returns the exception message.

param
nestingLevel nesting level of the exception
return
exception message at the given nesting level

        return (String) mLocMessageCache.get(String.valueOf(nestingLevel));
    
public java.lang.String[]getLocParam(int nestingLevel)
Returns the exception message parameters.

param
nestingLevel nesting level of the exception.
return
exception message parameters at the given nesting level.

        return (String[]) mLocParamCache.get(String.valueOf(nestingLevel));
    
public java.lang.StringgetLocToken(int nestingLevel)
Returns the message token.

param
nestingLevel nesting level of the exception.
return
message token at the given nesting level.

        return (String) mLocTokenCache.get(String.valueOf(nestingLevel));
    
public java.lang.StringgetStatusMessageType()
Get the status message type being returned by the component.

return
Status message type.

        return mStatusMsgType;
    
public java.lang.StringgetTaskName()
Get the name of the task executed by this component.

return
Task name.

        return mTaskName;
    
public java.lang.StringgetTaskResult()
Get the result of the task executed by this component.

return
Task Result.

        return mTaskResult;
    
public voidsetComponentName(java.lang.String name)
Set the name of the component that executed the task.

param
name - Name of the component.

        mComponentName = name;
    
public voidsetExceptionMessageType(java.lang.String exMsgType)
Set the exception message type being returned by the component.

param
exMsgType - type of exception message that is being returned by the component.

        mExceptionMsgType = exMsgType;
    
public voidsetExceptionObject(java.lang.Throwable exObj)
Set the exception object.

param
exObj - exception object.

        mExceptionObject = exObj;
    
public voidsetLocMessage(int nestingLevel, java.lang.String locMessage)
Set the message for the exception being thrown by the component.

param
nestingLevel - nesting level of the exception.
param
locMessage - exception message.

        mLocMessageCache.put(String.valueOf(nestingLevel), locMessage);
    
public voidsetLocParam(int nestingLevel, java.lang.String[] locParam)
Set the message parameters for the exception being thrown by the component.

param
nestingLevel - nesting level of the exception.
param
locParam - exception message parameters.

        mLocParamCache.put(String.valueOf(nestingLevel), locParam);
    
public voidsetLocToken(int nestingLevel, java.lang.String locToken)
Set the message token for the exception being thrown by the component.

param
nestingLevel - nesting level of the exception
param
locToken - message token.

        mLocTokenCache.put(String.valueOf(nestingLevel), locToken);
    
public voidsetStatusMessageType(java.lang.String statMsgType)
Set the message type being returned by the component.

param
statMsgType - type of success message that is being returned by the component.

        mStatusMsgType = statMsgType;
    
public voidsetTaskName(java.lang.String taskName)
Set the name of the task executed by component.

param
taskName - task executed by component.

        mTaskName = taskName;
    
public voidsetTaskResult(java.lang.String taskResult)
Set the result of the task executed by component.

param
taskResult - result of task executed by component.

        mTaskResult = taskResult;