org.mule.transport.legstar.config
Class HostProgram

java.lang.Object
  extended by org.mule.transport.legstar.config.HostProgram

public class HostProgram
extends Object

A slightly enhanced host program bean.

The maxDataLength field is more meaningful than length. The channelName field is more meaningful than channel. The inputContainer field is more meaningful than inContainer. The outputContainers field is more meaningful than outContainer.

Mule does unwanted controls on attributes named "name" (theuy need to be unique within a config) so we introduce programName as an alternative.


Constructor Summary
HostProgram()
           
 
Method Summary
 void addInputContainer(HostContainer container)
          Add an input container.
 void addOutputContainer(HostContainer container)
          Add an output container.
 String getChannelName()
           
 int getDataLength()
           
 List<HostContainer> getInputContainers()
           
 int getMaxDataLength()
           
 String getName()
           
 List<HostContainer> getOutputContainers()
           
 String getProgramName()
           
 String getSysID()
           
 String getTransID()
           
 boolean hasChannel()
           
 boolean isSyncOnReturn()
           
 void setChannelName(String name)
           
 void setDataLength(int dataLength)
           
 void setInputContainers(List<HostContainer> containers)
           
 void setMaxDataLength(int maxDataLength)
           
 void setName(String name)
           
 void setOutputContainers(List<HostContainer> containers)
           
 void setProgramName(String name)
           
 void setSyncOnReturn(boolean syncOnReturn)
           
 void setSysID(String sysID)
           
 void setTransID(String transID)
           
 String toJSONHost()
          Host program properties are sent to the host as a JSON serialization converted to a basic host character set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostProgram

public HostProgram()
Method Detail

getMaxDataLength

public int getMaxDataLength()
Returns:
largest commarea size supported

setMaxDataLength

public void setMaxDataLength(int maxDataLength)
Parameters:
maxDataLength - largest commarea size supported

getChannelName

public String getChannelName()
Returns:
channel name for container-driven programs

setChannelName

public void setChannelName(String name)
Parameters:
name - channel name for container-driven programs

addInputContainer

public void addInputContainer(HostContainer container)
Add an input container.

Parameters:
container - the new container to add

getInputContainers

public List<HostContainer> getInputContainers()
Returns:
the input containers list

setInputContainers

public void setInputContainers(List<HostContainer> containers)
Parameters:
containers - the input containers list to set

addOutputContainer

public void addOutputContainer(HostContainer container)
Add an output container.

Parameters:
container - the new container to add

getOutputContainers

public List<HostContainer> getOutputContainers()
Returns:
the output containers list

setOutputContainers

public void setOutputContainers(List<HostContainer> containers)
Parameters:
containers - the output containers list to set

getDataLength

public int getDataLength()
Returns:
Returns the size of the input data.

setDataLength

public void setDataLength(int dataLength)
Parameters:
dataLength - the size of the input data.

getName

public String getName()
Returns:
Returns the host program name.

setName

public void setName(String name)
Parameters:
name - host program name.

getProgramName

public String getProgramName()
Returns:
Returns the host program name.

setProgramName

public void setProgramName(String name)
Parameters:
name - host program name.

isSyncOnReturn

public boolean isSyncOnReturn()
Returns:
Returns the Syncpoint forced on return mode.

setSyncOnReturn

public void setSyncOnReturn(boolean syncOnReturn)
Parameters:
syncOnReturn - Syncpoint forced on return mode.

getSysID

public String getSysID()
Returns:
Returns the remote CICS ID.

setSysID

public void setSysID(String sysID)
Parameters:
sysID - remote CICS ID.

getTransID

public String getTransID()
Returns:
Returns the remote CICS transaction ID to use.

setTransID

public void setTransID(String transID)
Parameters:
transID - remote CICS transaction ID to use.

toJSONHost

public String toJSONHost()
                  throws org.json.JSONException
Host program properties are sent to the host as a JSON serialization converted to a basic host character set.

Mainframe programs in charge of reading that JSON serialization are not full fledged JSON parser so we simplify things here.

Returns:
a JSON serialization in host character set
Throws:
org.json.JSONException - if something is wrong with the attributes

hasChannel

public boolean hasChannel()
Returns:
true if this program uses channel/containers


Copyright © 2013 LegSem. All Rights Reserved.