com.latencybusters.pdm
Class PDMFieldInfo

java.lang.Object
  extended by com.latencybusters.pdm.PDMFieldInfo

public class PDMFieldInfo
extends java.lang.Object

A handle to field information returned from a PDMDefinition that is used when adding a field value to a PDMMessage.


Field Summary
protected static int INT_NAME_KNOWN_LEN
           
 
Constructor Summary
protected PDMFieldInfo()
           
protected PDMFieldInfo(int id, int name, PDMFieldType type, boolean required)
          Constructor used for single value fields with int names (except for fixed length strings)
protected PDMFieldInfo(int id, int name, PDMFieldType type, int fixedStrLen, boolean required)
          Constructor used for single value fixed-length string fields with int names
protected PDMFieldInfo(int id, java.lang.String strName, int intName, PDMFieldType type, int fixedStrLen, boolean required, int numElements)
          General constructor used for any single value or array field of fixed length or variable length with string or int names
protected PDMFieldInfo(int id, java.lang.String name, PDMFieldType type, boolean required)
          Constructor used for single value fields with string names (except for fixed length strings)
protected PDMFieldInfo(int id, java.lang.String name, PDMFieldType type, int fixedStrLen, boolean required)
          Constructor used for single value fixed-length string fields with String names
 
Method Summary
protected  int getFixedStrLen()
           
protected  int getId()
           
 int getIntName()
           
protected  int getLen()
           
protected  int getNumElements()
           
 java.lang.String getStrName()
           
 PDMFieldType getType()
           
protected  boolean isArray()
           
protected  boolean isFixed()
           
protected  boolean isRequired()
           
protected  int parse(PDMDeserializer deser, byte[] ba)
          Parses the byte array into this object
protected  int parse(PDMDeserializer deser, byte[] ba, int pos)
          Parses the byte array at position into this object
protected  byte[] toBytes(PDMSerializer ser)
          Serializes this object to a new byte array
protected  int toBytes(PDMSerializer ser, byte[] ba, int pos)
          Serializes this object to an existing byte array at position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INT_NAME_KNOWN_LEN

protected static final int INT_NAME_KNOWN_LEN
See Also:
Constant Field Values
Constructor Detail

PDMFieldInfo

protected PDMFieldInfo()

PDMFieldInfo

protected PDMFieldInfo(int id,
                       java.lang.String name,
                       PDMFieldType type,
                       boolean required)
Constructor used for single value fields with string names (except for fixed length strings)

Parameters:
id - the internal id
name - the string name
type - the type
required - whether or not the field is required

PDMFieldInfo

protected PDMFieldInfo(int id,
                       int name,
                       PDMFieldType type,
                       boolean required)
Constructor used for single value fields with int names (except for fixed length strings)

Parameters:
id - the internal id
name - the int name
type - the type
required - whether or not the field is required

PDMFieldInfo

protected PDMFieldInfo(int id,
                       java.lang.String name,
                       PDMFieldType type,
                       int fixedStrLen,
                       boolean required)
Constructor used for single value fixed-length string fields with String names

Parameters:
id - the internal id
name - the string name
type - the type
fixedStrLen - the fixed string length for this field
required - whether or not the field is required

PDMFieldInfo

protected PDMFieldInfo(int id,
                       int name,
                       PDMFieldType type,
                       int fixedStrLen,
                       boolean required)
Constructor used for single value fixed-length string fields with int names

Parameters:
id - the internal id
name - the int name
type - the type
fixedStrLen - the fixed string length for this field
required - whether or not the field is required

PDMFieldInfo

protected PDMFieldInfo(int id,
                       java.lang.String strName,
                       int intName,
                       PDMFieldType type,
                       int fixedStrLen,
                       boolean required,
                       int numElements)
General constructor used for any single value or array field of fixed length or variable length with string or int names

Parameters:
id - the internal id of the field info
strName - the string name
intName - the int name
type - the type
fixedStrLen - the fixed string length for this field
required - whether or not the field is required
numElements - the number of array elements for fixed-size arrays or 0
Method Detail

getId

protected int getId()

isRequired

protected boolean isRequired()

isFixed

protected boolean isFixed()

getLen

protected int getLen()

getFixedStrLen

protected int getFixedStrLen()

getNumElements

protected int getNumElements()

getType

public PDMFieldType getType()

isArray

protected boolean isArray()

getStrName

public java.lang.String getStrName()

getIntName

public int getIntName()

toBytes

protected byte[] toBytes(PDMSerializer ser)
Serializes this object to a new byte array

Parameters:
ser -
Returns:
the new byte array

toBytes

protected int toBytes(PDMSerializer ser,
                      byte[] ba,
                      int pos)
Serializes this object to an existing byte array at position

Parameters:
ser -
ba -
pos -
Returns:
the updated position in the byte array after serializing this object

parse

protected int parse(PDMDeserializer deser,
                    byte[] ba)
Parses the byte array into this object

Parameters:
deser -
ba -
Returns:
the updated position in the byte array after parsing this object

parse

protected int parse(PDMDeserializer deser,
                    byte[] ba,
                    int pos)
Parses the byte array at position into this object

Parameters:
deser -
ba -
pos -
Returns:
the updated position in the byte array after parsing this object


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.