Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.wtc.jatmi
Interface TypedBuffer

All Known Implementing Classes:
  StandardTypes, TypedCArray, TypedString, TypedXML, TypedFML32, TypedFML

public interface TypedBuffer

This interface is for TypedBuffers. Typed buffers must all implement the getType and getSubtype API, which take the place of the regular atmi function tptypes. Furthermore, they must implement _tmpresend and _tmpostrecv, which put the TypedBuffer object into encoded format or decode the encoded format. This is similar functionality to the Serializable interface, except that these functions must encode their objects in the format expected by the TUXEDO System (which, generally is XDR based).

Author:
  BEA Systems, Inc.

Method Summary
`void` | `_tmpostrecv(java.io.DataInputStream decoder, int recv_size)` This function takes an encoded byte array and and fills in the object it corresponding object.
`void` | `_tmpresend(java.io.DataOutputStream encoder)` This function presends and encodes the given TypedBuffer object.
`int` | `getHintIndex()` This function returns the hint index for this type and subtype.
`java.lang.String` | `getSubtype()` This function returns the string version of the subtype of this buffer.
`java.lang.String` | `getType()` This function returns the string version of the type of this buffer.

Method Detail

### getHintIndex

    public int getHintIndex()

  This function returns the hint index for this type and subtype. In ATMI TypedBuffers are referred to by an index number. BEA has reserved the index numbers 0-15 for internal types. The public index begins at 16. The index numbers come from the position of the buffer type in the buffer type switch table. So, for example, CARRAY has an index of 16, STRING has an index of 17 and so on. If you have created your own buffer type there is distinct performance improvement in giving your new TypedBuffer the same index as it would have on your native TUXEDO system.

  Returns:
    an `integer` representing the typeswitch index for this TypedBuffer.

### getType

    public java.lang.String getType()

  This function returns the string version of the type of this buffer.

  Returns:
    a `String` object that represents the type of this buffer

### getSubtype

    public java.lang.String getSubtype()

  This function returns the string version of the subtype of this buffer.

  Returns:
    a `String` object that represents the subtype of this buffer. May return NULL or the empty string if there is no subtype associated with this buffer

### _tmpresend

    public void _tmpresend(java.io.DataOutputStream encoder)
                    throws TPException,
                           java.io.IOException

  This function presends and encodes the given TypedBuffer object. It is equivalent to the combination of _tmpresend and _tmencdec functions from the buffer(3i) TUXEDO manual page.

  Parameters:
    `encoder` - The output stream to encode this type to. Should not be padded.
  Throws:
    TPException -
    - TPEINVAL - If there was some problem with the state of the TypedBuffer.
    - Any other errno is considered a fatal error
    java.io.IOException - If there was an error writing to the DataOutputStream

### _tmpostrecv

    public void _tmpostrecv(java.io.DataInputStream decoder,
                            int recv_size)
                     throws TPException,
                            java.io.IOException

  This function takes an encoded byte array and and fills in the object it corresponding object. It is equivalent to the combination of _tmencdec and _tmpostrecv functions from the buffer(3i) TUXEDO manual page.

  Parameters:
    `decoder` - A stream that starts with the encoded data for this buffer type. Only recv_size bytes should be read from the stream (though at the time this function is called all bytes necessary to decode this type should be available)
    `recv_size` - The total size of encoded data from the start position (note that encoded may be larger than the actual recieved size)
  Throws:
    TPException - TPEINVAL if this stream could not be decoded for any reason
    java.io.IOException - if there was an error reading from the stream

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference