com.tibco.amf.platform.runtime.extension.context
Interface BaseContext

All Known Subinterfaces:
ComponentContext, EndpointContext, ReferenceEndpointContext, ServiceEndpointContext

public interface BaseContext

Base interface for ComponentContext and EndpointContext


Method Summary
 MutableRequestContext createMutableRequestContext()
          Creates a MutableRequestContext that the component can use to set contextual information for a request.
 MutableRequestContext createMutableRequestContext(RequestContext initialRequestContext)
          Creates a MutableRequestContext that the component can use to set contextual information for a request.
 RequestContext createRequestContextFromBytes(byte[] bytes)
          Create a RequestContext from byte array
 java.lang.String getApplicationName()
          Returns the name of the application that this instance of the component is part of.
 org.osgi.framework.BundleContext getBundleContext()
          Returns the BundleContext that should be used to access OSGi metadata for the component.
 java.lang.ClassLoader getClassLoader()
          Returns the ClassLoader that should be used to load resources used by the component.
 java.lang.String getComponentName()
          Returns the name of the component.
 java.lang.String getComponentRevision()
          Returns the revision of the component.
 java.lang.String getComponentVersion()
          Returns the version of the component.
 org.slf4j.Logger getContextLogger()
          Returns the Logger that should be used for context logging for this component.
 java.lang.String getDesignURI()
          Returns the URI of the component at design time.
 java.lang.String getEnvironmentName()
          Returns the name of the environment that this instance of the component is running on.
 java.lang.String getHostName()
          Returns the name of the host that this instance of the component is running on.
 LifeCycleEvent getLifeCycleEvent()
           Returns the LifeCycleEvent describing the life cycle change, if the component/endpoint is currently processing a life cycle change, otherwise returns null.
 org.slf4j.Logger getLogger()
          Returns the Logger that should be used to log messages for the component.
 javax.management.MBeanServer getMBeanServer()
          Returns the MBeanServer that should be used to expose MBeans for the component.
 org.slf4j.Logger getMessageLogger()
          Returns the Logger that should be used for message logging for this component.
 java.lang.String getNodeName()
          Returns the name of the node that this instance of the component is running on.
 com.tibco.amf.sca.model.extensionpoints.Policy[] getPolicies()
          Returns the policies that are applicable for this component/endpoint, null if none are defined.
<B> B
getPolicyProperty(com.tibco.amf.sca.model.extensionpoints.Policy policy, java.lang.Class<B> type, java.lang.String propertyName)
          Returns the value of a property defined by the given policy.
<B> B
getProperty(java.lang.Class<B> type, java.lang.String propertyName)
          Returns the value of a property defined by this context.
 java.lang.String[] getPropertyNames()
          Returns all property names defined for this context.
 javax.resource.spi.ResourceAdapter getResourceAdapter(java.lang.Class<?> messageListenerType, java.lang.Class<? extends javax.resource.spi.ActivationSpec> activationSpecType)
           Returns the JCA ResourceAdapter given message listener and activation specification types, null if none found.
 javax.transaction.TransactionManager getTransactionManager()
          Returns the TransactionManager that should be used for managing transaction with the component
 java.lang.String getTypeDisplayName()
          Returns the display name for the implementation/binding type for this component.
 java.lang.String getURI()
          Returns the absolute URI of the component.
 URLToFileConverter getURLToFileConverter()
          Returns the URLToFileConverter that should be used to convert URL to files for the component.
 javax.transaction.UserTransaction getUserTransaction()
          Provides the UserTransaction that allows the application to explicitly manage transactions boundaries.
 java.io.File getWorkArea()
          Returns the File that should be used to store data for the component.
 

Method Detail

getPropertyNames

java.lang.String[] getPropertyNames()
Returns all property names defined for this context.

Returns:
the string array of property names

getProperty

<B> B getProperty(java.lang.Class<B> type,
                  java.lang.String propertyName)
Returns the value of a property defined by this context.

Type Parameters:
B - the Java type of the property
Parameters:
type - the Java type to be returned for the property
propertyName - the name of the property whose value should be returned
Returns:
the property value

getClassLoader

java.lang.ClassLoader getClassLoader()
Returns the ClassLoader that should be used to load resources used by the component.

Returns:
the component ClassLoader

getMBeanServer

javax.management.MBeanServer getMBeanServer()
Returns the MBeanServer that should be used to expose MBeans for the component.

Returns:
the component MBeanServer

getURI

java.lang.String getURI()
Returns the absolute URI of the component.

Returns:
the absolute URI of the component

getNodeName

java.lang.String getNodeName()
Returns the name of the node that this instance of the component is running on.

Returns:
the name of the node

getHostName

java.lang.String getHostName()
Returns the name of the host that this instance of the component is running on.

Returns:
the name of the host

getEnvironmentName

java.lang.String getEnvironmentName()
Returns the name of the environment that this instance of the component is running on.

Returns:
the name of the environment

getApplicationName

java.lang.String getApplicationName()
Returns the name of the application that this instance of the component is part of.

Returns:
the name of the application

getComponentName

java.lang.String getComponentName()
Returns the name of the component.

Returns:
the name of the component

getComponentVersion

java.lang.String getComponentVersion()
Returns the version of the component.

Returns:
the version of the component

getComponentRevision

java.lang.String getComponentRevision()
Returns the revision of the component.

Returns:
the revision of the component

getDesignURI

java.lang.String getDesignURI()
Returns the URI of the component at design time.

Returns:
the URI of the component at design time

getResourceAdapter

javax.resource.spi.ResourceAdapter getResourceAdapter(java.lang.Class<?> messageListenerType,
                                                      java.lang.Class<? extends javax.resource.spi.ActivationSpec> activationSpecType)

Returns the JCA ResourceAdapter given message listener and activation specification types, null if none found.

Parameters:
messageListenerType - message listener type
activationSpecType - activation specification type
Returns:
the resource adapter matching the listener type and activation specification, null if none found

getTransactionManager

javax.transaction.TransactionManager getTransactionManager()
Returns the TransactionManager that should be used for managing transaction with the component

Returns:
the component TransactionManager

getUserTransaction

javax.transaction.UserTransaction getUserTransaction()
Provides the UserTransaction that allows the application to explicitly manage transactions boundaries.

Returns:
the UserTransaction

getURLToFileConverter

URLToFileConverter getURLToFileConverter()
Returns the URLToFileConverter that should be used to convert URL to files for the component.

Returns:
the component URLToFileConverter

getLogger

org.slf4j.Logger getLogger()
Returns the Logger that should be used to log messages for the component.

Returns:
the component Logger

getMessageLogger

org.slf4j.Logger getMessageLogger()
Returns the Logger that should be used for message logging for this component.

Returns:
the message Logger for this component

getContextLogger

org.slf4j.Logger getContextLogger()
Returns the Logger that should be used for context logging for this component.

Returns:
the context Logger for this component

getWorkArea

java.io.File getWorkArea()
Returns the File that should be used to store data for the component.

Returns:
the component work area

getBundleContext

org.osgi.framework.BundleContext getBundleContext()
Returns the BundleContext that should be used to access OSGi metadata for the component.

Returns:
the component BundleContext

createMutableRequestContext

MutableRequestContext createMutableRequestContext()
Creates a MutableRequestContext that the component can use to set contextual information for a request.

Returns:
a MutableRequestContext to use for requests

createMutableRequestContext

MutableRequestContext createMutableRequestContext(RequestContext initialRequestContext)
Creates a MutableRequestContext that the component can use to set contextual information for a request. The given RequestContext is used to initialize the created context. The security subject, correlation ID and conversation are copied from that context.

Parameters:
initialRequestContext - the RequestContext to use to initialize the returned context
Returns:
a MutableRequestContext to use for requests

getTypeDisplayName

java.lang.String getTypeDisplayName()
Returns the display name for the implementation/binding type for this component. Null if the component does not have an implementation/binding.

Returns:
the display name for the implementation/binding type

getPolicies

com.tibco.amf.sca.model.extensionpoints.Policy[] getPolicies()
Returns the policies that are applicable for this component/endpoint, null if none are defined.

Returns:
the policies that are applicable for this component/endpoint

getPolicyProperty

<B> B getPolicyProperty(com.tibco.amf.sca.model.extensionpoints.Policy policy,
                        java.lang.Class<B> type,
                        java.lang.String propertyName)
Returns the value of a property defined by the given policy.

Type Parameters:
B - the Java type of the property
Parameters:
policy - the policy defining the property
type - the Java type to be returned for the property
propertyName - the name of the property whose value should be returned
Returns:
the property value

getLifeCycleEvent

LifeCycleEvent getLifeCycleEvent()

Returns the LifeCycleEvent describing the life cycle change, if the component/endpoint is currently processing a life cycle change, otherwise returns null.

Returns:
the life cycle event

createRequestContextFromBytes

RequestContext createRequestContextFromBytes(byte[] bytes)
                                             throws java.lang.Exception
Create a RequestContext from byte array

Parameters:
bytes - Byte Array to construct RequestContext from
Returns:
RequestContext object constructed from byte array
Throws:
java.lang.Exception - in case a problem creating the RequestContext


Copyright © 2010 TIBCO Software Inc. All Rights Reserved.