it.imolinfo.jbi4ejb.jbi.component.runtime
Class RuntimeContext

java.lang.Object
  extended by it.imolinfo.jbi4ejb.jbi.component.runtime.RuntimeContext

public class RuntimeContext
extends java.lang.Object

This class is used to store and retrieve the information that should be available anywhere in the component runtime. Each instance variable of this class will be initialized at various points of the component runtime using setter methods on this class. For example, the ComponentContext and related resources from this class are not available to the component runtime until the jbi framework calls the init method of the ComponentLifeCycle of this component.

Author:
Sun Microsystems, Inc.

Method Summary
 void closeDeliveryChannel()
          closes the delivery channel as part of the component shutdown process.
 javax.jbi.component.ComponentContext getComponentContext()
          Getter for property mComponentContext.
 java.lang.String getComponentName()
          Returns the Component Name if the ComponentContext is set.
 javax.jbi.messaging.DeliveryChannel getDeliveryChannel()
          Getter for property DeliveryChannel.
static RuntimeContext getInstance()
           
 java.util.logging.Logger getLogger()
          Returns the logger.
 MessageExchangeHandlerFactory getMessageExchangeHandlerFactory()
          Getter for property MessageExchangeHandlerFactory.
 MessageExchangeHandler newMessageExchangeHandler(javax.jbi.messaging.MessageExchange msgExchange)
          helper method to create a new message exchange handler using the message exchange factory set on the runtime context.
 void openDeliveryChannel()
          opens the delivery channel to accept the message exchange objects or send the message exchange objects
 void setComponentContext(javax.jbi.component.ComponentContext componentContext)
          Setter for property ComponentContext.
 void setLogger(java.lang.String name, java.lang.String resourceBundle)
          Sets the logger.
 void setMessageExchangeHandlerFactory(MessageExchangeHandlerFactory factory)
          Setter for property MessageExchangeHandlerFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RuntimeContext getInstance()

getComponentContext

public javax.jbi.component.ComponentContext getComponentContext()
Getter for property mComponentContext.

Returns:
Value of property mComponentContext.

setComponentContext

public void setComponentContext(javax.jbi.component.ComponentContext componentContext)
Setter for property ComponentContext.

Parameters:
componentContext - New value of property ComponentContext.

getDeliveryChannel

public javax.jbi.messaging.DeliveryChannel getDeliveryChannel()
Getter for property DeliveryChannel.

Returns:
Value of property DeliveryChannel.

openDeliveryChannel

public void openDeliveryChannel()
opens the delivery channel to accept the message exchange objects or send the message exchange objects


closeDeliveryChannel

public void closeDeliveryChannel()
closes the delivery channel as part of the component shutdown process.


setLogger

public void setLogger(java.lang.String name,
                      java.lang.String resourceBundle)
Sets the logger.

Parameters:
name - name for the Logger.
resourceBundle - resource bundle for the logger. can be null.

getLogger

public java.util.logging.Logger getLogger()
Returns the logger.

Returns:
Logger

getComponentName

public java.lang.String getComponentName()
Returns the Component Name if the ComponentContext is set. else null

Returns:
component name

getMessageExchangeHandlerFactory

public MessageExchangeHandlerFactory getMessageExchangeHandlerFactory()
Getter for property MessageExchangeHandlerFactory.

Returns:
Value of property MessageExchangeHandlerFactory.

setMessageExchangeHandlerFactory

public void setMessageExchangeHandlerFactory(MessageExchangeHandlerFactory factory)
Setter for property MessageExchangeHandlerFactory.

Parameters:
componentContext - New value of property MessageExchangeHandlerFactory.

newMessageExchangeHandler

public MessageExchangeHandler newMessageExchangeHandler(javax.jbi.messaging.MessageExchange msgExchange)
helper method to create a new message exchange handler using the message exchange factory set on the runtime context.



Copyright © 2007-2008 Imola Informatica. All Rights Reserved.