6.3.4.1 DataQueue Class

Constructors

 

DataQueue ( String library, String queue )

 

Methods

 

String getEncoding ()

 

String check ()

String check ( String authority )

 

int getKeyLength ()

int getMessageLength ()

 

boolean clear ()

boolean clear ( String key )

 

boolean write ( String data )

boolean write ( byte[] data )

 

boolean write ( String key, String data )

boolean write ( String key, byte[] data )

 

byte[] read ( int waitTime )

byte[] read ( String key, int waitTime )

 

String readString ( int waitTime )

String readString ( String key, int waitTime )

 

Maximum sizes

 

Queue length

10 bytes

Library length

10 bytes

Authority length

10 bytes

Max Key length

256 bytes

Max Message length

64512 bytes

 

  

Comments

The write method will convert the Unicode String into bytes using the CCSID of the job.

When the JNI service writes the byte message to the data queue, the message is padded with white space.

The read method will read the next message from the data queue.

The readString method will read the next message from the data queue and convert it to a Unicode string.

The data queue wait time on the read method only takes effect if it is the first thread to attempt to read data.

The check method returns one of the following values.

Null

Internal Error

Zero length string

OK

CPFnnnn

i5/OS message Id