Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.wtc.jatmi
Class TypedFML32

    java.lang.Object
      weblogic.wtc.jatmi.StandardTypes
          weblogic.wtc.jatmi.MBStringTypes
              weblogic.wtc.jatmi.TypedFML32

All Implemented Interfaces:
  Serializable, FML, TypedBuffer

    public final class TypedFML32

extends MBStringTypes
implements TypedBuffer, Serializable, FML

This implements TypedFML32 in JAVA as a TypedBuffer. Fieldids are generated with the tool mkfldclass32, and then put into the buffer with the appropriate TypedFML32 methods. Note that in this implementation Fieldids must be combined into a field key, which is a combination of the Fldid32 and the occurrence number. Any number of field tables can be loaded into any TypedFML32 object in order to do FldId to String conversions and String to FldId conversions.

See Also:
  `FmlKey`, `FldTbl`, `TypedBuffer`, `mkfldclass32`, Serialized Form

Field Summary
`protected HashMap` | `_flds`
`protected HashMap` | `fldid_occs`
`protected FldTbl[]` | `fldtbls`
`protected int` | `indxintvl`
`protected int` | `len`
`protected int` | `magic`
`protected int` | `maxlen`
`protected int` | `nfields`
`protected int` | `nie`

Fields inherited from class weblogic.wtc.jatmi.MBStringTypes
`mbencoding`

Fields inherited from class weblogic.wtc.jatmi.StandardTypes
`CALLOUT_HINT, CARRAY_HINT, CMPS_HDR_HINT, COMPOS_HINT, FML_HINT, FML32_HINT, MBSTRING_HINT, MTTYP_HINT, PROP_HINT, ROUTE_HINT, RPCRP_HINT, RPCRQ_HINT, STRING_HINT, TDOM_VALS_HINT, TGIOP_HINT, TM_HINT, TPINITTYPE_HINT, TRAN_HINT, UNSOL_HINT, VIEW_HINT, VIEW32_HINT, WS_HINT, WSRPCRQ_HINT, X_C_TYPE_HINT, X_COMMON_HINT, X_OCTET_HINT, XML_HINT`

Fields inherited from interface weblogic.wtc.jatmi.FML
`FLD_CARRAY, FLD_CHAR, FLD_DECIMAL, FLD_DOUBLE, FLD_FLOAT, FLD_FML32, FLD_INT, FLD_LONG, FLD_MBSTRING, FLD_PTR, FLD_SHORT, FLD_STRING, FLD_VIEW32`

Constructor Summary
`TypedFML32()` Default constructor.
`TypedFML32(FldTbl table)` Constructor which provides a single FldTbl object for mapping FldIds to Strings and Strings to FldIds Note that it is not necesary to provide FldTbls unless String/FldId mappings are required.
`TypedFML32(FldTbl[] tables)` Constructor which provides a list FldTbl objects for mapping FldIds to Strings and Strings to FldIds.
`TypedFML32(FldTbl[] tables, int maxFlds, int maxIds)` Constructor which provides a list FldTbl objects for mapping FldIds to Strings and Strings to FldIds.
`TypedFML32(FldTbl table, int maxFlds, int maxIds)` Constructor which provides a single FldTbl object for mapping FldIds to Strings and Strings to FldIds The maxFlds and maxIds give hints to optimize the performance.
`TypedFML32(int maxFlds, int maxIds)` This constructor initializes an empty FML32 buffer.
`TypedFML32(TypedFML32 copyFrom)` This constructor copies the fields from the input FML32 buffer.

Method Summary
`void` | `_tmpostrecv(DataInputStream decoder, int recv_size)` This function takes an encoded byte array and and fills in the object it corresponding object.
`void` | `_tmpresend(DataOutputStream encoder)` This function presends and encodes the given TypedBuffer object.
`void` | `Fadd(int fldid32, Object value)` Adds the given object.
`void` | `Fchg(FmlKey key, Object value)` Adds the given object, whose field id is contained in key to the fielded buffer.
`void` | `Fchg(int fldid, int occurrence, Object value)` Adds the given object.
`void` | `Fdel(FmlKey key)` Delete given key from fielded buffer.
`void` | `Fdel(int fldid, int occurrence)` Delete given element from fielded buffer.
`Object` | `Fget(FmlKey key)` Retrieves a copy of the object stored in the FML32 buffer of the given field id and occurrence number.
`Object` | `Fget(int fldid, int occurrence)` Retrieves a copy of the object stored in the FML buffer of the given field id and occurrence number.
`Iterator` | `Fiterator()` Returns an iterator for the start of the fielded FML32 buffer.
`int` | `Fldid(String name)` Returns the field id corresponding to the given name.
`int` | `Fldno(int fldid32)` Given a fieldid, this returns the field number
`int` | `Fldtype(int fldid32)` Given a fieldid, this returns the field type
`String` | `Fname(int fldid32)` Returns the string that matches the given fieldid.
`int` | `Foccur(int fldid)` Returns the number of occurences of the field specified by fldid
`int` | `Fused()` Returns the amount of space that this FML buffer will take when present
`FldTbl[]` | `getFieldTables()` gets the current list of FldTbls that are being used by this FML32 object to do FldId/String mappings.
`protected boolean` | `hasPointerFields()` Tells whether or not this buffer has any embedded pointers within it at all
`void` | `setFieldTables(FldTbl[] tables)` This function sets the list of FldTbl objects that can be used for FldId/String mappings
`Iterator` | `sortedFiterator()`

Methods inherited from class weblogic.wtc.jatmi.MBStringTypes
`getMBEncoding, setMBEncoding`

Methods inherited from class weblogic.wtc.jatmi.StandardTypes
`getHintIndex, getSubtype, getType, hint_to_type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface weblogic.wtc.jatmi.TypedBuffer
`getHintIndex, getSubtype, getType`

Field Detail

### magic

    protected int magic

### len

    protected int len

### maxlen

    protected int maxlen

### nfields

    protected int nfields

### nie

    protected int nie

### indxintvl

    protected int indxintvl

### _flds

    protected HashMap _flds

### fldid_occs

    protected HashMap fldid_occs

### fldtbls

    protected FldTbl[] fldtbls

Constructor Detail

### TypedFML32

    public TypedFML32()

  Default constructor. Initializes an empty FML32 buffer.

### TypedFML32

    public TypedFML32(int maxFlds,
                      int maxIds)

  This constructor initializes an empty FML32 buffer. with hints to optimize performance.

  Parameters:
    `maxFlds` - Maximum number of fields in the TypedFML32 buffer including all the occurrences.
    `maxIds` - Maximum number of unique field IDs in the TypedFML32 buffer.

### TypedFML32

    public TypedFML32(FldTbl[] tables)

  Constructor which provides a list FldTbl objects for mapping FldIds to Strings and Strings to FldIds. Note that it is not necesary to provide FldTbls unless String/FldId mappings are required.

  Parameters:
    `tables` - A list of FldTbl objects that can be used to map FldIds and strings

### TypedFML32

    public TypedFML32(FldTbl[] tables,
                      int maxFlds,
                      int maxIds)

  Constructor which provides a list FldTbl objects for mapping FldIds to Strings and Strings to FldIds. Note that it is not necesary to provide FldTbls unless String/FldId mappings are required. The maxFlds and maxIds give hints to optimize the performance.

  Parameters:
    `tables` - A list of FldTbl objects that can be used to map FldIds and strings
    `maxFlds` - Maximum number of fields including all the occurrences in a TypedFML32 buffer
    `maxIds` - Maximum number of unique FML32 IDs in a buffer.

### TypedFML32

    public TypedFML32(FldTbl table)

  Constructor which provides a single FldTbl object for mapping FldIds to Strings and Strings to FldIds Note that it is not necesary to provide FldTbls unless String/FldId mappings are required.

  Parameters:
    `table` - A FldTbl object that can be used to map FldIds and strings

### TypedFML32

    public TypedFML32(FldTbl table,
                      int maxFlds,
                      int maxIds)

  Constructor which provides a single FldTbl object for mapping FldIds to Strings and Strings to FldIds The maxFlds and maxIds give hints to optimize the performance. Note that it is not necesary to provide FldTbls unless String/FldId mappings are required.

  Parameters:
    `table` - A FldTbl object that can be used to map FldIds
    `maxFlds` - Maximum number of fields including all the occurrences in a TypedFML32 buffer.
    `maxIds` - Maximum number of unique field ID in a TypedFML32 buffer and strings

### TypedFML32

    public TypedFML32(TypedFML32 copyFrom)

  This constructor copies the fields from the input FML32 buffer.

  Parameters:
    `copyFrom` - The FML32 buffer to copy data from

Method Detail

### setFieldTables

    public void setFieldTables(FldTbl[] tables)

  This function sets the list of FldTbl objects that can be used for FldId/String mappings

  Specified by:
    `setFieldTables` in interface `FML`
  Parameters:
    `tables` - The list of tables to use for FldId/String mappings
  See Also:
    `FldTbl`

### getFieldTables

    public FldTbl[] getFieldTables()

  gets the current list of FldTbls that are being used by this FML32 object to do FldId/String mappings.

  Specified by:
    `getFieldTables` in interface `FML`
  Returns:
    The list of FldTbl objects used for FldId/String mappings

### Fldno

    public int Fldno(int fldid32)

  Given a fieldid, this returns the field number

  Specified by:
    `Fldno` in interface `FML`
  Parameters:
    `fldid32` - The field id from which to extract the field number
  Returns:
    The field number associated with this feild id

### Fldtype

    public int Fldtype(int fldid32)

  Given a fieldid, this returns the field type

  Specified by:
    `Fldtype` in interface `FML`
  Parameters:
    `fldid32` - The field id from which to extract the field type
  Returns:
    The following field types:
    - FLD_SHORT
    - FLD_LONG
    - FLD_CHAR
    - FLD_FLOAT
    - FLD_DOUBLE
    - FLD_STRING
    - FLD_CARRAY
    - FLD_INT
    - FLD_DECIMAL
    - FLD_PTR
    - FLD_FML32
    - FLD_VIEW32
    - FLD_MBSTRING

### Fchg

    public void Fchg(FmlKey key,
                     Object value)
              throws Ferror

  Adds the given object, whose field id is contained in key to the fielded buffer. key also contains the occurrence number of the field to add to the buffer. If an entry of that field id and occurrence exists in the buffer, this object will take its place. If there are no occurrence numbers prior to this occurrence number and field id then the occurrences prior to this one will be filled in with null entries. The following table gives the Field type and the associated object expected by FML
  - FLD_SHORT - Short
  - FLD_LONG - Integer
  - FLD_CHAR - Character
  - FLD_FLOAT - Float
  - FLD_DOUBLE - Double
  - FLD_STRING - String
  - FLD_CARRAY - byte[]
  - FLD_INT - Not yet supported
  - FLD_DECIMAL - Not yet supported
  - FLD_PTR - TypedBuffer
  - FLD_FML32 - TypedFML32
  - FLD_VIEW32 - Not yet supported
  - FLD_MBSTRING - TypedMBString

  Specified by:
    `Fchg` in interface `FML`
  Parameters:
    `key` - The fieldid and occurrence to add to the buffer
    `value` - The element to add to the buffer. Note that this object must match the type of object expected by the field type, or an invalid cast exception will be thrown
  Throws:
    `Ferror` - usually if space is low
  See Also:
    `FmlKey`

### Fchg

    public void Fchg(int fldid,
                     int occurrence,
                     Object value)
              throws Ferror

  Adds the given object. This version of Fchg takes the fieldid and occurrence number, and may be more conveinient than the other version of Fchg which requires an FmlKey to be constructed by the caller. If an entry of that field id and occurrence exists in the buffer, this object will take its place. If there are no occurrence numbers prior to this occurrence number and field id then the occurrence prior to this one will be filled in with null entries. The following table gives the Field type and the associated object expected by FML
  - FLD_SHORT - Short
  - FLD_LONG - Integer
  - FLD_CHAR - Character
  - FLD_FLOAT - Float
  - FLD_DOUBLE - Double
  - FLD_STRING - String
  - FLD_CARRAY - byte[]
  - FLD_INT - Not yet supported
  - FLD_DECIMAL - Not yet supported
  - FLD_PTR - TypedBuffer
  - FLD_FML32 - TypedFML32
  - FLD_VIEW32 - Not yet supported
  - FLD_MBSTRING - TypedMBString

  Specified by:
    `Fchg` in interface `FML`
  Parameters:
    `fldid` - The fieldid to add to this buffer
    `occurrence` - The occurrence number of the field to add
    `value` - The element to add to the buffer. Note that this object must match the type of object expected by the field type, or an invalid cast exception will be thrown
  Throws:
    `Ferror` - usually if space is low
  See Also:
    `FmlKey`

### Fadd

    public void Fadd(int fldid32,
                     Object value)
              throws Ferror

  Adds the given object. The following table gives the Field type and the associated object expected by FML
  - FLD_SHORT - Short
  - FLD_LONG - Integer
  - FLD_CHAR - Character
  - FLD_FLOAT - Float
  - FLD_DOUBLE - Double
  - FLD_STRING - String
  - FLD_CARRAY - byte[]
  - FLD_INT - Not yet supported
  - FLD_DECIMAL - Not yet supported
  - FLD_PTR - TypedBuffer
  - FLD_FML32 - TypedFML32
  - FLD_VIEW32 - Not yet supported
  - FLD_MBSTRING - TypedMBString

  Parameters:
    `fldid32` - The fieldid to add to this buffer
    `value` - The element to add to the buffer. Note that this object must match the type of object expected by the field type, or an invalid cast exception will be thrown
  Throws:
    `Ferror` - usually if space is low
  See Also:
    `FmlKey`

### Fget

    public Object Fget(FmlKey key)
                throws Ferror

  Retrieves a copy of the object stored in the FML32 buffer of the given field id and occurrence number. Notice that changing the object returned will NOT change the value in the FML32 buffer. The value returned is a COPY of the value in the FML32 buffer. The following table gives the Field type and the associated object returned by FML
  - FLD_SHORT - Short
  - FLD_LONG - Integer
  - FLD_CHAR - Character
  - FLD_FLOAT - Float
  - FLD_DOUBLE - Double
  - FLD_STRING - String
  - FLD_CARRAY - byte[]
  - FLD_INT - Not yet supported
  - FLD_DECIMAL - Not yet supported
  - FLD_PTR - TypedBuffer
  - FLD_FML32 - TypedFML32
  - FLD_VIEW32 - Not yet supported
  - FLD_MBSTRING - TypedMBString

  Specified by:
    `Fget` in interface `FML`
  Parameters:
    `key` - the field id and occurrence number of the element to retrieve
  Returns:
    the field object stored at that occurrence number
  Throws:
    `Ferror` - if the object is not found in the buffer among other reasons

### Fget

    public Object Fget(int fldid,
                       int occurrence)
                throws Ferror

  Retrieves a copy of the object stored in the FML buffer of the given field id and occurrence number. This version of the API takes the fieldid and occurrence number rather than the FmlKey Notice that changing the object returned will NOT change the value in the FML buffer. The value returned is a COPY of the value in the FML buffer. The following table gives the Field type and the associated object returned by FML
  - FLD_SHORT - Short
  - FLD_LONG - Integer
  - FLD_CHAR - Character
  - FLD_FLOAT - Float
  - FLD_DOUBLE - Double
  - FLD_STRING - String
  - FLD_CARRAY - byte[]
  - FLD_INT - Not yet supported
  - FLD_DECIMAL - Not yet supported
  - FLD_PTR - TypedBuffer
  - FLD_FML32 - TypedFML32
  - FLD_VIEW32 - Not yet supported
  - FLD_MBSTRING - TypedMBString

  Specified by:
    `Fget` in interface `FML`
  Parameters:
    `fldid` - The field id of the element to retrieve
    `occurrence` - The occurrence number of the element to retrieve
  Returns:
    the field object stored at that occurrence number
  Throws:
    `Ferror` - if the object is not found in the buffer among other reasons

### Fiterator

    public Iterator Fiterator()

  Returns an iterator for the start of the fielded FML32 buffer. An example usage may be as follows. fml32iter = fml32obj.Fiterator(); while(fml32iter.hasNext()) { entry = (Map.Entry)fml32iter.next(); fmlkey = (FmlKey) entry.getKey(); switch(Fldtype32(fmlkey.get_fldid())) { case FLD_SHORT: value_short = (Short) entry.getValue(); } }

  Specified by:
    `Fiterator` in interface `FML`
  Returns:
    the Iterator for the fielded FML32 buffer

### sortedFiterator

    public Iterator sortedFiterator()

### Foccur

    public int Foccur(int fldid)

  Returns the number of occurences of the field specified by fldid

  Specified by:
    `Foccur` in interface `FML`
  Parameters:
    `fldid` - the field id to look for in the fielded FML32 buffer
  Returns:
    the number of occurences of a fldid in the fielded FML32 buffer

### hasPointerFields

    protected boolean hasPointerFields()

  Tells whether or not this buffer has any embedded pointers within it at all

  Returns:
    true if there exist any embedded pointers, including any pointer fields in embedded TypedFML32 buffers

### Fdel

    public void Fdel(FmlKey key)
              throws Ferror

  Delete given key from fielded buffer. The object with the given field id and the given occurrence will be removed from the buffer

  Specified by:
    `Fdel` in interface `FML`
  Parameters:
    `key` - The field id and occurrence of the element to be removed
  Throws:
    `Ferror` - if the element is not in the buffer among other reasons

### Fdel

    public void Fdel(int fldid,
                     int occurrence)
              throws Ferror

  Delete given element from fielded buffer. The object with the given field id and the given occurrence will be removed from the buffer. This differs from the other version in that it takes the field id and occurrence number rather than a constructed key

  Specified by:
    `Fdel` in interface `FML`
  Parameters:
    `fldid` - The field id of the element to be removed
    `occurrence` - The occurrence of the element to be removed
  Throws:
    `Ferror` - if the element is not in the buffer among other reasons

### Fname

    public String Fname(int fldid32)
                 throws Ferror

  Returns the string that matches the given fieldid. For this mapping a list of FldTbl objects should be loaded into this FML32 object.

  Specified by:
    `Fname` in interface `FML`
  Parameters:
    `fldid32` - The field id to map to a string
  Returns:
    The name of the field
  Throws:
    `Ferror.FBADFLD` - if the mapping cannot be found
    `Ferror` - if the name cannot be found

### Fldid

    public int Fldid(String name)
              throws Ferror

  Returns the field id corresponding to the given name. A table of FldTbl objects should be loaded into this FML32 object in order to map the name to a field id.

  Specified by:
    `Fldid` in interface `FML`
  Parameters:
    `name` - the name of the field we are trying to find
  Returns:
    The `integer` field id
  Throws:
    `Ferror.FBADNAME` - if the field id cannot be found
    `Ferror` - if the field id cannot be found

### Fused

    public int Fused()

  Returns the amount of space that this FML buffer will take when present

  Specified by:
    `Fused` in interface `FML`
  Parameters:
    `The` - size of this buffer when present

### _tmpresend

    public void _tmpresend(DataOutputStream encoder)
                    throws TPException,
                           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.

  XDR encodes the FML32 buffer

  Specified by:
    `_tmpresend` in interface `TypedBuffer`
  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
    `IOException` - If there was an error writing to the DataOutputStream

### _tmpostrecv

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

  Description copied from interface: `TypedBuffer`
  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.

  Specified by:
    `_tmpostrecv` in interface `TypedBuffer`
  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:
    `IOException` - if there was an error reading from the stream
    `TPException` - TPEINVAL if this stream could not be decoded for any reason

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD