org.openeai.implementations.gateways.requestproxy
Class EnterpriseRequestProxyCommand
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.jms.consumer.commands.ConsumerCommand
|
+--org.openeai.jms.consumer.commands.RequestCommandImpl
|
+--org.openeai.implementations.gateways.requestproxy.EnterpriseRequestProxyCommand
- All Implemented Interfaces:
- RequestCommand
- public class EnterpriseRequestProxyCommand
- extends RequestCommandImpl
- implements RequestCommand
OpenEAI Reference Implementation Enterprise Request Proxy.
The purpose of this command is to verify that an untrusted application making
a request of an authoritative source is authorized to do so. The gateway associated
to this command sits between an untrusted requesting application and an authoritative
source. The requesting application is only permitted to send requests to a Queue
monitored by the request proxy. Requests delivered to that Queue are consumed by the
EnterpriseRequestProxy. If this command determines that the requesting application
is authorized to perform the request it will forward the request to the intended target on behalf
of the requesting application, consume the response and return it to the requesting
application. Technically speaking, only the request proxy has authority to connect to
the Queues monitored by authoritative systems. The only other applications that
should be allowed to connect directly to those Queues are other "trusted" applications.
Deciding whether or not an application is trusted, is a case by case decision.
If the requesting application is not authorized to make the request, an
error will be returned indicating this.
Authorization to perform a request can be determined in a number of ways. For this
implementation, there are two potential layers to this determination. The first layer
is based soley on the messageObject, messageRelease and messageAction associated to the request.
The configuration of this command will provide the information needed to make this
determination (MessageObjectConfigs associated to a requesting application). The
second layer can be much more complex and is based on any number of other factors including
the content of the message or other ancillary information that may be retrieved from
other sources. Of these two layers, the first is always used. The second layer
need only be used if appropriate and is driven by configuration properties specified
in the configuration associated to this command.
One difference between the deployment of this gateway and most others is that
a single instance of the RequestProxy will generally have PointToPoinConsumers
connecting to a destination specific to each application that may be making a request.
This is because each untrusted application is only given access to one destination
based on the way this RequestProxy implementation is designed. This makes the configuration
of the gateway simpler because you can separate each requesting application into its
own set of configuration information. Additionally, it makes the broker environment
more clear and easier to restrict access.
These are the configuration parameters associated to this command. These are
specified the Command's Configuration element in the deployment document associated
to the gateway.
| Property Name |
Required |
Description |
| MessagingComponents |
yes |
This is a container Element that provides a mechanism for specifying which
Applications will be making requests. It simply contains one or more Application Elements
which are used by this command to establish AppConfig objects associated to each requesting
application. The AppConfig objects that get established will contain all the resources needed to
proxy the messages from the requesting applications appropriately. |
| Application |
yes |
This Element is used to specify the name of the requesting application that will be
making requests. It is also a container for the Configuration Element which is implemented by the AppConfig
Java object and contains all initialized resources required to proxy the messages from the
requesting applications. The "id" attribute is used to specify the name of the requesting application.
The MessageObjects used by the requesting application must be configured appropriately to use the same
application name or they will never be allowed to send any requests. The
Description element is used to provide a description of the requesting application. There should be a
Application Element specified for each requesting application that should be proxied. |
| Configuration |
yes |
This Element is implmemented by the AppConfig java object. This is the same configuration
Element used by all other messaging components that use an AppConfig. This will contain the
resources required to proxy requests. Those resources include:
|
- Author:
- Tod Jackson
- See Also:
ProxyCommand,
ProxyCommand.execute(AppConfig, Document),
ProxyCommandImpl,
AppConfig,
LoggerConfig,
ConsumerConfig,
CommandConfig,
ProducerConfig,
MessageObjectConfig
|
Method Summary |
javax.jms.Message |
execute(int messageNumber,
javax.jms.Message aMessage)
Method used to implement business logic specific to a message or set of messages consumed
by a OpenEAI PointToPointConsumer. |
| Methods inherited from class org.openeai.jms.consumer.commands.ConsumerCommand |
addAppConfig, buildError, convertToString, generateRelease, getAppConfig, getAppConfigs, getControlArea, getInboundXmlValidation, getMessageAction, getMessageBody, getMessageCategory, getMessageDumpDirectory, getMessageObject, getMessageRelease, getMessageType, getMsgComponents, getOutboundXmlValidation, initializeInput, setAppConfig, setInboundXmlValidation, setMessageDumpDirectory, setMsgComponents, setOutboundXmlValidation, setWriteToFile, writeMessageToFile, writeToFile |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnterpriseRequestProxyCommand
public EnterpriseRequestProxyCommand(CommandConfig cConfig)
throws java.lang.InstantiationException
- Constructor
execute
public final javax.jms.Message execute(int messageNumber,
javax.jms.Message aMessage)
throws CommandException
- Description copied from interface:
RequestCommand
- Method used to implement business logic specific to a message or set of messages consumed
by a OpenEAI PointToPointConsumer. When a consumer consumes a message it determines which
RequestCommand implementation to execute and calls this method passing the JMS Message. The command
then retrieves the body of the message and converts that into an XML Document (org.jdom.Document). Then
the command executes business logic appropriate to it based on the contents of the message.
- Specified by:
execute in interface RequestCommand
- Returns:
- Message the JMS Message that should be returned to the calling application after
the command has performed its business logic.
CommandException - See Also:
SyncCommand.execute
Copyright © 2002, OpenEAI Software Foundation