|
CICS® Transaction Gateway Base API Programming Reference v8.1.0.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.ctg.client.Channel
public class Channel
A Channel is a named collection of Container
objects that can be passed to a CICS program.
A Channel can be sent on an ECI request by calling
ECIRequest.setChannel
.
Constructor Summary | |
---|---|
Channel(java.lang.String channelName)
Creates a new empty Channel with the specified name. |
Method Summary | |
---|---|
void |
addContainer(Container container)
Adds the provided container to the channel. |
Container |
copyContainer(java.lang.String containerName,
Channel sourceChannel)
Copy a container from another channel |
Container |
copyContainer(java.lang.String containerName,
Channel sourceChannel,
java.lang.String newContainerName)
Copy a container from another channel |
Container |
createContainer(java.lang.String containerName,
byte[] data)
Creates a container to hold binary data within the channel. |
Container |
createContainer(java.lang.String containerName,
byte[] data,
int CCSID)
Creates a container to hold character data within the channel. |
Container |
createContainer(java.lang.String containerName,
byte[] data,
java.lang.String encoding)
Creates a container to hold character data within the channel. |
Container |
createContainer(java.lang.String containerName,
java.lang.String data)
Creates a container to hold character data within the channel. |
Container |
createContainer(java.lang.String containerName,
java.lang.String data,
java.lang.String encoding)
Deprecated. |
void |
deleteContainer(java.lang.String name)
Deletes the container from the channel. |
int |
getCCSID()
Returns the default CCSID associated with the channel |
java.lang.String |
getCodePage()
Returns the default code page associated with the channel |
Container |
getContainer(java.lang.String name)
This method will examine the current containers within this channel looking for a container with the name supplied. |
java.util.Set<java.lang.String> |
getContainerNames()
Gets a collection containing the names of all the containers in the channel. |
java.util.Collection<Container> |
getContainers()
Get a collection of all of the containers held within the channel |
java.lang.String |
getName()
Returns the name of the channel |
Container |
moveContainer(java.lang.String containerName,
Channel sourceChannel)
Move a container from another channel |
Container |
moveContainer(java.lang.String containerName,
Channel sourceChannel,
java.lang.String newContainerName)
Move a container from another channel |
void |
setCCSID(int ccsid)
Sets the CCSID of the channel |
java.lang.String |
toString()
Returns a string representation of the channel. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Channel(java.lang.String channelName) throws ChannelException
The Channel name must be between 1 and 16 characters in length and must consist of only the following types of character:
Channel names are case sensitive.
channelName
- Unique name for this channel
ChannelNameException
- if the channel name includes invalid characters or is null
ChannelException
Method Detail |
---|
public Container createContainer(java.lang.String containerName, byte[] data) throws ContainerException
The contents of the container will be set to the data supplied. Data within this container will not be considered for codepage conversion. The data will be transferred to the CICS application exactly as supplied.
The container name must be between 1 and 16 characters in length and must consist of only the following types of character:
Container names are case sensitive.
containerName
- name for this container to be referenced bydata
- data to be placed in the container referenced by containerName
ContainerException
- if the container name includes invalid characters or is
null, or a container with the same name already exists in
this channel@Deprecated public Container createContainer(java.lang.String containerName, java.lang.String data, java.lang.String encoding) throws java.io.UnsupportedEncodingException, ContainerException
java.io.UnsupportedEncodingException
ContainerException
public Container createContainer(java.lang.String containerName, byte[] data, java.lang.String encoding) throws java.io.UnsupportedEncodingException, ContainerException
The contents of the container will be set to the data supplied.
The container name must be between 1 and 16 characters in length and must consist of only the following types of character:
Container names are case sensitive.
containerName
- name for this container to be referenced bydata
- byte data to be placed in the container referenced by
containerNameencoding
- the codepage of the character data supplied
ContainerException
- if the container name includes invalid characters or is
null, or a container with the same name already exists in
this channel
java.io.UnsupportedEncodingException
- if the encoding is not supportedpublic Container createContainer(java.lang.String containerName, java.lang.String data) throws java.io.UnsupportedEncodingException, ContainerException
The contents of the container will be set to the String data supplied.
Data within this container will be converted to the appropriate codepage specified in the CICS application. The container will inherit the CCSID of the channel.
The container name must be between 1 and 16 characters in length and must consist of only the following types of character:
Container names are case sensitive.
containerName
- name for this container to be referenced bydata
- String data to be placed in the container referenced by
containerName
ContainerException
- if the container name includes invalid characters or is
null, or a container with the same name already exists in
this channel
java.io.UnsupportedEncodingException
- if the CCSID of the channel is not supportedpublic Container createContainer(java.lang.String containerName, byte[] data, int CCSID) throws java.io.UnsupportedEncodingException, ContainerException
The contents of the container will be set to the data supplied.
The container name must be between 1 and 16 characters in length and must consist of only the following types of character:
Container names are case sensitive.
containerName
- name for this container to be referenced bydata
- byte[] data to be placed in the container referenced by
containerNameCCSID
- the CCSID of the character data supplied
ContainerException
- if the container name includes invalid characters or is
null, or a container with the same name already exists in
this channel
java.io.UnsupportedEncodingException
- if the CCSID is not supportedpublic Container copyContainer(java.lang.String containerName, Channel sourceChannel) throws ContainerException
Copy a container from sourceChannel into this channel. The container containerName will be copied to this channel.
containerName
- the container name to be copiedsourceChannel
- reference to the channel that holds the container
ContainerException
- if the container is not found in sourceChannel or a
container with the same name already exists in this channelpublic Container copyContainer(java.lang.String containerName, Channel sourceChannel, java.lang.String newContainerName) throws ContainerException
Copy a container from sourceChannel into this channel. The container containerName will be copied to this channel with a new name newContainerName
containerName
- the container name to be copiedsourceChannel
- reference to the channel that holds the containernewContainerName
- new container name within this channel
ContainerException
- if the container is not found in sourceChannel, the new
container name includes invalid characters or is null, or a
container with the same name already exists in this channelpublic Container moveContainer(java.lang.String containerName, Channel sourceChannel) throws ContainerException
Move a container from sourceChannel into this channel. The container will no longer exist in sourceChannel. The container containerName will be moved to this channel.
containerName
- the container name to be movedsourceChannel
- reference to the channel that holds the container
ContainerException
- if the container is not found in sourceChannel or a
container with the same name already exists in this channelpublic Container moveContainer(java.lang.String containerName, Channel sourceChannel, java.lang.String newContainerName) throws ContainerException
Move a container from sourceChannel into this channel. The container will no longer exist in sourceChannel. The container containerName will be moved to this channel with a new name newContainerName
containerName
- the container name to be movedsourceChannel
- reference to the channel that holds the containernewContainerName
- new container name within this channel
ContainerException
- if the container is not found in sourceChannel, the new
container name includes invalid characters or is null, or a
container with the same name already exists in this channelpublic Container getContainer(java.lang.String name) throws ContainerNotFoundException
If a container with a matching name is found then a reference to that container is returned.
name
- the container name to find
ContainerNotFoundException
- if the container name is not foundpublic java.util.Collection<Container> getContainers()
public void deleteContainer(java.lang.String name) throws ContainerException
name
- name of the container to delete
ContainerException
- if the container name is not foundpublic void addContainer(Container container) throws ContainerException, ContainerExistsException
container
- The container to add to the channel
ContainerException
- If the container is not of the correct type
ContainerExistsException
- if a container with the same name already exists in
this channelpublic java.util.Set<java.lang.String> getContainerNames()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public int getCCSID()
public java.lang.String getCodePage()
public void setCCSID(int ccsid)
ccsid
- The CCSID this channel should set as its default.
|
©Copyright IBM Corp. 1994, 2012 Legal |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |