If you need to extend the parse transformation operations in Message Designer, implement the ICustomParserField interface. Write your own custom logic to parse a field type. The result of this process is a custom class that is an extension point of a field. The JAR must reside in your Message Designer Project's CustomClasses folder or subfolder. When editing a message definition in Message Designer, you can assign this custom class to any number of fields.
Full source for ICustomParserField:
// package declaration package com.sybase.jtf.parser.api; /** * The ICustomParserField interface provides an extension point in which * clients can develop custom code to define a means of parsing a field * that is not defined in the standard API. */ public interface ICustomParserField { /** * * * @param buffer The message buffer. * @param offset The offset into the buffer. * @param max The maximum offset within the buffer. * @param result The result of the parse. * @param name The name of the component. * * @return The number of bytes consumed or -1 meaning failure. */ public int parseField(byte[] buffer, int offset, int max, ParseResult result, String name); }
Developing Custom Classes for Transforming Message Definition Fields
Implementing a Custom Field Serializer with ICustomSerializerField
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com