org.mule.transport.legstar.wmq.transformer
Class HostToMqcihExecRequestMuleTransformer

java.lang.Object
  extended by org.mule.transformer.AbstractTransformer
      extended by org.mule.transformer.AbstractMessageTransformer
          extended by org.mule.transport.legstar.transformer.AbstractHostMuleTransformer
              extended by org.mule.transport.legstar.cixs.transformer.AbstractHostToExecRequestMuleTransformer
                  extended by org.mule.transport.legstar.wmq.transformer.HostToMqcihExecRequestMuleTransformer
All Implemented Interfaces:
org.mule.api.AnnotatedObject, org.mule.api.context.MuleContextAware, org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.NameableObject, org.mule.api.NamedObject, org.mule.api.processor.MessageProcessor, org.mule.api.transformer.MessageTransformer, org.mule.api.transformer.Transformer, org.mule.endpoint.EndpointAware

public class HostToMqcihExecRequestMuleTransformer
extends AbstractHostToExecRequestMuleTransformer

HostToMqcihMuleTransformer wraps host data into an IBM CICS MQ Bridge (MQCIH) payload.

Source type is a simple byte array holding mainframe data. This is the content of the commarea passed to the target CICS program by CICS MQ Bridge. LegStar transformers typically produce this type of byte arrays.

The return type is a byte array ready to be sent to the mainframe. It is expected that the mainframe has the IBM CICS MQ Bridge installed.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.transport.legstar.transformer.AbstractHostMuleTransformer
AbstractHostMuleTransformer.HolderGetter, AbstractHostMuleTransformer.HolderSetter
 
Field Summary
 
Fields inherited from class org.mule.transport.legstar.cixs.transformer.AbstractHostToExecRequestMuleTransformer
LEGSTAR_HOST_TRACE_ON_KEY
 
Fields inherited from class org.mule.transformer.AbstractTransformer
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
HostToMqcihExecRequestMuleTransformer()
           
 
Method Summary
 byte[] getMqcihBytes(HostProgram hostProgram, HostCredentials hostCredentials)
          Produce the serialization of the MQCIH header as a byte array in the target host character set.
 int getWaitInterval()
           
 void setMessageProperties(org.mule.api.MuleMessage esbMessage)
          Allows derived classes to set additional properties on the esb message.
 void setWaitInterval(int waitInterval)
           
 byte[] wrapHostData(byte[] hostData, org.mule.api.MuleMessage esbMessage)
          This method wraps a single part payload into an MQCIH formatted message.
 byte[] wrapHostData(Map<String,byte[]> hostDataMap, org.mule.api.MuleMessage esbMessage)
          If the mainframe is expecting a formatted mainframe program execution request message, this method wraps a multi part payloads into a mainframe program execution request message.
 
Methods inherited from class org.mule.transport.legstar.cixs.transformer.AbstractHostToExecRequestMuleTransformer
getHostCompatibleCorrelationId, getHostProgram, getReplyTo, hostTransform, isHostTraceOn, setHostProgram, setHostTraceOn, setReplyTo
 
Methods inherited from class org.mule.transport.legstar.transformer.AbstractHostMuleTransformer
getHostCharset, getHostCharset, getI18NMessages, setHostCharset, transformMessage
 
Methods inherited from class org.mule.transformer.AbstractMessageTransformer
checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transform
 
Methods inherited from class org.mule.transformer.AbstractTransformer
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transformer.Transformer
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform
 
Methods inherited from interface org.mule.api.processor.MessageProcessor
process
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.NameableObject
setName
 
Methods inherited from interface org.mule.api.NamedObject
getName
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.endpoint.EndpointAware
setEndpoint
 

Constructor Detail

HostToMqcihExecRequestMuleTransformer

public HostToMqcihExecRequestMuleTransformer()
Method Detail

wrapHostData

public byte[] wrapHostData(byte[] hostData,
                           org.mule.api.MuleMessage esbMessage)
                    throws org.mule.api.transformer.TransformerException
This method wraps a single part payload into an MQCIH formatted message. The payload is the concatenation of the MQCIH header, the target CICS program name and finally the commarea data.

Specified by:
wrapHostData in class AbstractHostToExecRequestMuleTransformer
Parameters:
hostData - the single part mainframe payload
esbMessage - the original mule message
Returns:
the payload MQCIH message
Throws:
org.mule.api.transformer.TransformerException - if wrapping fails

wrapHostData

public byte[] wrapHostData(Map<String,byte[]> hostDataMap,
                           org.mule.api.MuleMessage esbMessage)
                    throws org.mule.api.transformer.TransformerException
If the mainframe is expecting a formatted mainframe program execution request message, this method wraps a multi part payloads into a mainframe program execution request message.

Specified by:
wrapHostData in class AbstractHostToExecRequestMuleTransformer
Parameters:
hostDataMap - the multi part mainframe payload (one entry per container)
esbMessage - the original mule message
Returns:
the payload eventually wrapped in a mainframe program execution request message
Throws:
org.mule.api.transformer.TransformerException - if wrapping fails

setMessageProperties

public void setMessageProperties(org.mule.api.MuleMessage esbMessage)
Allows derived classes to set additional properties on the esb message.

Specified by:
setMessageProperties in class AbstractHostToExecRequestMuleTransformer
Parameters:
esbMessage - the original mule message

getMqcihBytes

public final byte[] getMqcihBytes(HostProgram hostProgram,
                                  HostCredentials hostCredentials)
                           throws org.mule.api.transformer.TransformerException
Produce the serialization of the MQCIH header as a byte array in the target host character set.

Parameters:
hostProgram - the target program attributes
hostCredentials - the credentials used to authenticate to the mainframe
Returns:
MQCIH as a byte array
Throws:
org.mule.api.transformer.TransformerException - if message cannot be built

getWaitInterval

public final int getWaitInterval()
Returns:
Time in milliseconds that the MQGET calls issued by the bridge should wait for second and subsequent request messages for the unit of work started by this message.

setWaitInterval

public final void setWaitInterval(int waitInterval)
Parameters:
waitInterval - Time in milliseconds that the MQGET calls issued by the bridge should wait for second and subsequent request messages for the unit of work started by this message.


Copyright © 2013 LegSem. All Rights Reserved.