com.resilientedge.jockey.appcomm
Interface Marshallable
- All Known Implementing Classes:
- AbstractMarshallable, CallMethod, FixedString, MarshallableInt
- public interface Marshallable
An interface for objects that can be flattened to a language neutral
bytestream.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- John Gardner
Method Summary |
int |
fromBytes(byte[] buffer,
int offset)
Reinitialize this object from the contents of an array of bytes. |
java.lang.String |
getMarshalName()
Return an identifier for this object. |
int |
getMarshalSize()
Return the number of bytes that this object would require to marshal
itself. |
int |
toBytes(byte[] buffer,
int offset)
Marshal this object to a language independent array of bytes. |
SUCCESS
public static final int SUCCESS
FAILED
public static final int FAILED
TYPE_FIXED_STRING
public static final byte TYPE_FIXED_STRING
TYPE_UINT_32
public static final byte TYPE_UINT_32
TYPE_OBJECT
public static final byte TYPE_OBJECT
getMarshalName
public java.lang.String getMarshalName()
- Return an identifier for this object. This has to be unique among
marshallable objects.
Currently, format is "PI" | "SI" "class-stem-name".
- Returns:
- name for this object.
toBytes
public int toBytes(byte[] buffer,
int offset)
- Marshal this object to a language independent array of bytes.
- Parameters:
buffer
- a destination buffer to receive this object.offset
- begin marshalling at this offset from buffer start- Returns:
- the number of bytes of the input buffer consumed.
fromBytes
public int fromBytes(byte[] buffer,
int offset)
- Reinitialize this object from the contents of an array of bytes.
- Parameters:
buffer
- a buffer containing the marshalled object.offset
- begin unmarshalling at this offset from buffer start- Returns:
- the number of bytes of the input buffer consumed.
getMarshalSize
public int getMarshalSize()
- Return the number of bytes that this object would require to marshal
itself.
- Returns:
- the number of bytes that this object would consume.
Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.