webMethods Broker Administration Java API
Version 9.5.1.0.171 091713

COM.activesw.api.client
Class BrokerEvent

java.lang.Object
  extended by COM.activesw.api.client.BrokerEvent
All Implemented Interfaces:
java.io.Serializable

public class BrokerEvent
extends java.lang.Object
implements java.io.Serializable

Represents an Information Broker event. Events have an event type. If the event is created with an associated client, then the event becomes associated with that client's broker and type and field name checking is performed as operations on the event are performed. Otherwise, no type or field checking is performed.
All field_name parameters take fully qualified field names, which are formatted like C or Java variable accessing. Fields in a structure are accessed with a '.' like this "field1.subfield1". Fields in a sequence are accessed with array brackets like this "field2[3]". These can be combined to make complex names such as "field3.x[1][35].a.y[2]".

All event_type_name parameters take fully qualified event type names, such as "MyScope::MyEvent".

See Also:
Serialized Form

Field Summary
protected  boolean ack_status
           
static int AUTO_SIZE
           
protected  java.lang.String broker_host
           
protected  java.lang.String broker_name
           
protected  int broker_port
           
protected  boolean client_validation
           
static int DEFAULT_PRIORITY
           
protected  boolean dirty
           
static int ENTIRE_SEQUENCE
           
static int ENVELOPE_FLAGS_INSERTED_EVENT
           
static int ENVELOPE_FLAGS_LOGGED_EVENT
           
static int ENVELOPE_FLAGS_NO_VALIDATION
           
static int ENVELOPE_FLAGS_OPEN_VALIDATION
           
protected  long event_id
           
protected  java.lang.String event_type_name
           
static int HIGH_PRIORITY
           
static int LOW_PRIORITY
           
protected  COM.activesw.api.client.NativeEvent native_event
           
protected  long pub_seqn
           
protected  long recv_seqn
           
protected  int redelivery_count
           
protected  int session_id
           
protected  int[] sub_ids
           
protected  BrokerClient the_client
           
protected  BrokerTypeDef type_def
           
protected  byte[] wire_event
           
 
Constructor Summary
BrokerEvent(BrokerClient client, java.lang.String event_type_name)
          Create an event of the appropriate type with an associated client.
BrokerEvent(BrokerClient client, java.lang.String event_type_name, java.lang.Class storage_class)
          Deprecated. As of Java API v6.5.
BrokerEvent(BrokerClient client, java.lang.String event_type_name, java.lang.Object storage_object)
          Deprecated. As of Java API v6.5.
BrokerEvent(BrokerEvent event)
          Copy constructor.
BrokerEvent(java.lang.String event_type_name, BrokerClusterPublisher bcp)
          Create an event of the appropriate type with an associated client from the BrokerClusterPublisher's cluster pool.
BrokerEvent(java.lang.String event_type_name, BrokerClusterPublisher bcp, java.lang.Class storage_class)
          Deprecated. As of Java API v6.5.
BrokerEvent(java.lang.String event_type_name, BrokerClusterPublisher bcp, java.lang.Object storage_object)
          Deprecated. As of Java API v6.5.
 
Method Summary
protected static void checkSetEnvField(java.lang.String field_name, java.lang.String full_field_name)
           
 void clear()
          Clears all fields of the event so it can be re-used.
 void clearField(java.lang.String field_name)
          Clear (un-set) a field in the event.
 void clearField(java.lang.String field_name, boolean ignoreEx)
          Clear (un-set) a field in the event.
 void clearFieldInternal(java.lang.String field_name, boolean ignoreEx)
           
 void clearModificationFlag()
          Clear the modification flag.
static BrokerEvent fromBinData(BrokerClient client, byte[] data)
           
static BrokerEvent fromBinData(BrokerClient client, byte[] data, java.lang.String event_type_name)
          Create an event using a byte array given out by toBinData().
 void fromObject(java.lang.Object obj)
          Deprecated. As of Java API v6.5.
 void fromObject(java.lang.Object obj, boolean readOnly)
          Deprecated. As of Java API v6.5.
 java.lang.String getBaseTypeName()
          Get the type name without the scope qualification.
protected  COM.activesw.api.client.NativeStruct getBody()
           
protected  COM.activesw.api.client.NativeFieldIterator getBodyIterator()
           
 boolean getBooleanField(java.lang.String field_name)
          Get the value of a boolean field.
 boolean getBooleanProperty(java.lang.String property_name)
           
 boolean[] getBooleanSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a boolean sequence field.
 byte getByteField(java.lang.String field_name)
          Get the value of a byte field.
 byte getByteProperty(java.lang.String property_name)
           
 byte[] getByteSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a byte sequence field.
 char getCharField(java.lang.String field_name)
          Get the value of a char field.
 char[] getCharSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a char sequence field.
 BrokerClient getClient()
          Get the event's client.
 boolean getClientValidation()
           
 BrokerDate getDateField(java.lang.String field_name)
          Get the value of a date field.
 BrokerDate[] getDateSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a date sequence field.
 double getDoubleField(java.lang.String field_name)
          Get the value of a double field.
 double getDoubleProperty(java.lang.String property_name)
           
 double[] getDoubleSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a double sequence field.
protected  COM.activesw.api.client.NativeStruct getEnvelope()
           
protected  COM.activesw.api.client.NativeFieldIterator getEnvelopeIterator()
           
 BrokerEvent getEventField(java.lang.String field_name)
          Get the value of an event field.
 long getEventId()
          Get the event ID (as set by the broker) for this event.
 BrokerEvent[] getEventSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of an event sequence field.
 BrokerField getField(java.lang.String field_name)
          Get the value of field.
 java.lang.String[] getFieldNames(java.lang.String field_name)
          Get the list of field names in an event.
 short getFieldType(java.lang.String field_name)
          Gets the type for the specified field.
 float getFloatField(java.lang.String field_name)
          Get the value of a float field.
 float getFloatProperty(java.lang.String property_name)
           
 float[] getFloatSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a float sequence field.
 int getIntegerField(java.lang.String field_name)
          Get the value of an integer field.
 int[] getIntegerSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of an integer sequence field.
 int getIntProperty(java.lang.String property_name)
           
 long getLongField(java.lang.String field_name)
          Get the value of a long field.
 long getLongProperty(java.lang.String property_name)
           
 long[] getLongSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a long sequence field.
protected  COM.activesw.api.client.NativeEvent getNativeEvent()
           
 int getPriority()
          Gets the priority of the event.
 java.lang.Object getProperty(java.lang.String property_name)
           
 java.lang.String[] getPropertyNames(java.lang.String field_name)
          Get the list of property names in an event.
 long getPublishSequenceNumber()
          Get the publishing sequence number for this event.
 long getReceiptSequenceNumber()
          Get the receipt sequence number (as set by the broker) for this event.
 int getRedeliveryCount()
          Get the redelivery count (as set by the broker) for this event.
 int getRetrievedSessionId()
          Get the session id on which this event was retrieved.
 boolean getRetrievedStatus()
          Get the acknowledgement status of the event.
 java.lang.String getScopeTypeName()
          Get the scope of the event type name.
 BrokerField getSequenceField(java.lang.String field_name, int offset, int max_n)
          Get the value of a sequence field.
 int getSequenceFieldSize(java.lang.String field_name)
          Get the size of a sequence field.
 short getShortField(java.lang.String field_name)
          Get the value of a short field.
 short getShortProperty(java.lang.String property_name)
           
 short[] getShortSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a short sequence field.
 short[] getShortSeqFieldInternal(java.lang.String field_name, int offset, int max_n)
           
 java.lang.Object getStorageObject()
          Deprecated. As of Java API v6.5.
 java.lang.String getStringField(java.lang.String field_name)
          Get the value of a string field.
 java.lang.String getStringProperty(java.lang.String property_name)
           
 java.lang.String[] getStringSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a string sequence field.
 BrokerEvent getStructFieldAsEvent(java.lang.String field_name)
          Get the value of a structure field.
 BrokerEvent[] getStructSeqFieldAsEvents(java.lang.String field_name, int offset, int max_n)
          Get the value of a structure sequence field.
 int[] getSubscriptionIds()
          Get the subscription IDs for an event.
 int getTag()
          Get the event's 'tag' envelope field.
 BrokerTypeDef getTypeDef()
          Get the event's type definition.
 java.lang.String getTypeName()
          Get the fully qualified type name.
 char getUCCharField(java.lang.String field_name)
          Get the value of a unicode char field.
 char[] getUCCharSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a unicode char sequence field.
 java.lang.String getUCStringField(java.lang.String field_name)
          Get the value of a unicode string field.
 java.lang.String[] getUCStringSeqField(java.lang.String field_name, int offset, int max_n)
          Get the value of a unicode string sequence field.
protected  byte[] getWireEvent()
           
 boolean hasBeenModified()
          Check if event has been modified since last time the modification flag was cleared.
 boolean isAckReply()
          Determine if the given event is an acknowledgement reply.
 boolean isErrorReply()
          Determine if the given event is an error reply.
 boolean isFieldSet(java.lang.String field_name)
          Determine if the specified field is set in the event.
 boolean isFieldSetInternal(java.lang.String field_name)
           
 boolean isLastReply()
          Determines if the given event is the last event in a reply sequence.
 boolean isNullReply()
          Determine if the given event is a 'null' event.
 void setBooleanField(java.lang.String field_name, boolean value)
          Sets the value of a boolean field.
 void setBooleanProperty(java.lang.String property_name, boolean value)
           
 void setBooleanSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, boolean[] value)
          Sets the value of a subrange of a boolean sequence field.
 void setByteField(java.lang.String field_name, byte value)
          Sets the value of a byte field.
 void setByteProperty(java.lang.String property_name, byte value)
           
 void setByteSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, byte[] value)
          Sets the value of a subrange of a byte sequence field.
 void setCharField(java.lang.String field_name, char value)
          Sets the value of a char field.
 void setCharSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, char[] value)
          Sets the value of a subrange of a char sequence field.
 void setClientValidation(boolean client_validation)
          This method will enable/disable client side validation.
 void setDateField(java.lang.String field_name, BrokerDate value)
          Sets the value of a date field.
 void setDateSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, BrokerDate[] value)
          Sets the value of a subrange of a date sequence field.
 void setDoubleField(java.lang.String field_name, double value)
          Sets the value of a double field.
 void setDoubleProperty(java.lang.String property_name, double value)
           
 void setDoubleSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, double[] value)
          Sets the value of a subrange of a double sequence field.
 void setEventField(java.lang.String field_name, BrokerEvent value)
          Sets the value of an event field.
 void setEventSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, BrokerEvent[] value)
          Set the value of an event sequence field.
 void setField(java.lang.String field_name, BrokerField field)
          Sets the value of a field.
 void setField(java.lang.String field_name, short field_type, java.lang.Object value)
          Sets the value of a field.
 void setFloatField(java.lang.String field_name, float value)
          Sets the value of a float field.
 void setFloatProperty(java.lang.String property_name, float value)
           
 void setFloatSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, float[] value)
          Sets the value of a subrange of a float sequence field.
 void setIntegerField(java.lang.String field_name, int value)
          Sets the value of an integer field.
 void setIntegerSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, int[] value)
          Sets the value of a subrange of an integer sequence field.
 void setIntProperty(java.lang.String property_name, int value)
           
 void setLongField(java.lang.String field_name, long value)
          Sets the value of a long field.
 void setLongProperty(java.lang.String property_name, long value)
           
 void setLongSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, long[] value)
          Sets the value of a subrange of a long sequence field.
 void setModificationFlag()
          Set the modification flag.
 void setNullProperty(java.lang.String property_name, java.lang.String value)
           
 void setPriority(int priority)
          Sets the priority of the event.
 void setPublishSequenceNumber(long seqn)
          Set the publishing sequence number for this event.
 void setSequenceField(java.lang.String field_name, short field_type, int src_offset, int dest_offset, int n, java.lang.Object value)
          Sets the value of a subrange of a sequence field.
 void setSequenceFieldSize(java.lang.String field_name, int size)
          Set the size of a sequence field.
 void setShortField(java.lang.String field_name, short value)
          Sets the value of a short field.
 void setShortProperty(java.lang.String property_name, short value)
           
 void setShortSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, short[] value)
          Sets the value of a subrange of a short sequence field.
 void setStringField(java.lang.String field_name, java.lang.String value)
          Sets the value of a string field.
 void setStringFieldToSubstring(java.lang.String field_name, int offset, int nc, java.lang.String value)
          Sets the value of a string field to a substring of another string.
 void setStringProperty(java.lang.String property_name, java.lang.String value)
           
 void setStringSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, java.lang.String[] value)
          Sets the value of a subrange of a string sequence field.
 void setStructFieldFromEvent(java.lang.String field_name, BrokerEvent value)
          Sets the value of a structure field.
 void setStructSeqFieldFromEvents(java.lang.String field_name, int src_offset, int dest_offset, int n, BrokerEvent[] value)
          Sets the value of a structure sequence field.
 void setTag(int tag)
          Set the event's 'tag' envelope field.
 void setTypeName(java.lang.String event_type_name)
           
 void setUCCharField(java.lang.String field_name, char value)
          Sets the value of a unicode char field.
 void setUCCharSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, char[] value)
          Sets the value of a subrange of a unicode char sequence field.
 void setUCStringField(java.lang.String field_name, java.lang.String value)
          Sets the value of a unicode string field.
 void setUCStringFieldToSubstring(java.lang.String field_name, int offset, int nc, java.lang.String value)
          Sets the value of a unicode string field to a substring of another string.
 void setUCStringSeqField(java.lang.String field_name, int src_offset, int dest_offset, int n, java.lang.String[] value)
          Sets the value of a subrange of a unicode string sequence field.
 void setWireEvent(byte[] w_event)
           
static java.lang.String stringFromANSI(java.lang.String st)
          Convert a String object which contains only ANSI 8-bit characters, to another String which contains unicode characters.
static java.lang.String stringToANSI(java.lang.String st)
          Convert a String object to another String which only contains characters which cleanly map to ANSI 8-bit characters.
 byte[] toBinData()
          Get out the event's data as a byte array.
 java.lang.String toFormattedString(java.lang.String formatString)
          Format an event string.
 java.lang.String toFormattedString(java.lang.String formatString, java.util.Locale locale)
          Format an event string.
 java.lang.String toLocalizedFormattedString(java.lang.String formatString)
          Format an event string.
 java.lang.String toLocalizedString()
          Get event content as a string which includes newlines formatted for the default locale.
 void toObject(java.lang.Object obj)
          Deprecated. As of Java API v6.5.
 java.lang.String toString()
          Get event content as a string which includes newlines formatted for the US English locale.
 java.lang.String toString(int indent_level)
          Get event content as a string suitable for human viewing formatted for the US English locale.
 java.lang.String toString(int indent_level, java.util.Locale locale)
          Get event content as a string suitable for human viewing formatted for the specified locale.
 java.lang.String toString(java.util.Locale locale)
          Get event content as a string which includes newlines formatted for the specified locale.
 byte[] toWireEvent()
           
 void validate(BrokerClient client)
          Validate event in the context of the specified client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENTIRE_SEQUENCE

public static final int ENTIRE_SEQUENCE
See Also:
Constant Field Values

AUTO_SIZE

public static final int AUTO_SIZE
See Also:
Constant Field Values

ENVELOPE_FLAGS_INSERTED_EVENT

public static final int ENVELOPE_FLAGS_INSERTED_EVENT
See Also:
Constant Field Values

ENVELOPE_FLAGS_LOGGED_EVENT

public static final int ENVELOPE_FLAGS_LOGGED_EVENT
See Also:
Constant Field Values

ENVELOPE_FLAGS_OPEN_VALIDATION

public static final int ENVELOPE_FLAGS_OPEN_VALIDATION
See Also:
Constant Field Values

ENVELOPE_FLAGS_NO_VALIDATION

public static final int ENVELOPE_FLAGS_NO_VALIDATION
See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
See Also:
Constant Field Values

HIGH_PRIORITY

public static final int HIGH_PRIORITY
See Also:
Constant Field Values

LOW_PRIORITY

public static final int LOW_PRIORITY
See Also:
Constant Field Values

native_event

protected transient COM.activesw.api.client.NativeEvent native_event

wire_event

protected transient byte[] wire_event

sub_ids

protected transient int[] sub_ids

pub_seqn

protected transient long pub_seqn

recv_seqn

protected transient long recv_seqn

redelivery_count

protected transient int redelivery_count

client_validation

protected transient boolean client_validation

event_id

protected transient long event_id

event_type_name

protected transient java.lang.String event_type_name

the_client

protected transient BrokerClient the_client

broker_host

protected transient java.lang.String broker_host

broker_name

protected transient java.lang.String broker_name

broker_port

protected transient int broker_port

dirty

protected transient boolean dirty

type_def

protected transient BrokerTypeDef type_def

ack_status

protected transient boolean ack_status

session_id

protected transient int session_id
Constructor Detail

BrokerEvent

public BrokerEvent(BrokerClient client,
                   java.lang.String event_type_name)
            throws BrokerException
Create an event of the appropriate type with an associated client. If the client is specified, the event will be typechecked and all fields in the type definition will appear to be there at all times. If the client is null, the event will not be typechecked and only fields which have actively been set will appear in the event.

Throws:
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException - If event_type_name is null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerException

BrokerEvent

public BrokerEvent(BrokerClient client,
                   java.lang.String event_type_name,
                   java.lang.Class storage_class)
            throws BrokerException
Deprecated. As of Java API v6.5.

Create an event of the appropriate type with the associated client and Java class.

If both a client and a class are provided, the event will be typechecked and all fields in the type definition that also appear in the Java class will appear to be there at all times. Fields that appear only in the type definition are not accessible. Field types in the class must match exactly. There is no implicit type conversion.

If no client is provided, then fields will still be typechecked, but only ones in the Java class will be accessible.

Throws:
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the class is a different type than the same field in the event type.
BrokerInvalidClassException - If the storage_class cannot be instantiated using the Class.newInstance() method.
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type. Or if the class provided cannot be instantiated.
BrokerNullParameterException - If event_type_name or storage_class are null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerException

BrokerEvent

public BrokerEvent(BrokerClient client,
                   java.lang.String event_type_name,
                   java.lang.Object storage_object)
            throws BrokerException
Deprecated. As of Java API v6.5.

Create an event of the appropriate type with the associated client and Java object. The Java object is itself used for storage by this event instance. If both a client and an object are provided, the event will be typechecked and all fields in the type definition that also appear in the Java object will appear to be there at all times. Fields that appear only in the object or only in the type definition are not accessible. Field types in the class must match exactly. There is no implicit type conversion. If no client is provided, then fields will still be typechecked, but only ones in the Java object will be accessible.

Throws:
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the object's class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the object's class is a different type than the same field in the event type.
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException - If event_type_name or storage_object are null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerException

BrokerEvent

public BrokerEvent(java.lang.String event_type_name,
                   BrokerClusterPublisher bcp)
            throws BrokerException
Create an event of the appropriate type with an associated client from the BrokerClusterPublisher's cluster pool. If the cluster publisher is specified, the event will be typechecked and all fields in the type definition will appear to be there at all times. If the cluster publisher is null, the event will not be typechecked and only fields which have actively been set will appear in the event.

Throws:
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException - If event_type_name is null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerClusterPublisherException - If no broker is available on the cluster pool.
BrokerException

BrokerEvent

public BrokerEvent(java.lang.String event_type_name,
                   BrokerClusterPublisher bcp,
                   java.lang.Class storage_class)
            throws BrokerException
Deprecated. As of Java API v6.5.

Create an event of the appropriate type with an associated client from the BrokerClusterPublisher's cluster pool and Java class.

If both a cluster publisher and a class are provided, the event will be typechecked and all fields in the type definition that also appear in the Java class will appear to be there at all times. Fields that appear only in the type definition are not accessible. Field types in the class must match exactly. There is no implicit type conversion.

If no cluster publisher is provided, then fields will still be typechecked, but only ones in the Java class will be accessible.

Throws:
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the class is a different type than the same field in the event type.
BrokerInvalidClassException - If the storage_class cannot be instantiated using the Class.newInstance() method.
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type. Or if the class provided cannot be instantiated.
BrokerNullParameterException - If event_type_name or storage_class are null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerClusterPublisherException - If no broker is available on the cluster pool.
BrokerException

BrokerEvent

public BrokerEvent(java.lang.String event_type_name,
                   BrokerClusterPublisher bcp,
                   java.lang.Object storage_object)
            throws BrokerException
Deprecated. As of Java API v6.5.

Create an event of the appropriate type with the associated client from the BrokerClusterPublisher's cluster pool and Java object. The Java object is itself used for storage by this event instance. If both a cluster publisher and an object are provided, the event will be typechecked and all fields in the type definition that also appear in the Java object will appear to be there at all times. Fields that appear only in the object or only in the type definition are not accessible. Field types in the class must match exactly. There is no implicit type conversion. If no cluster publisher is provided, then fields will still be typechecked, but only ones in the Java object will be accessible.

Throws:
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the object's class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the object's class is a different type than the same field in the event type.
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException - If event_type_name or storage_object are null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerClusterPublisherException - If no broker is available on the cluster pool.
BrokerException

BrokerEvent

public BrokerEvent(BrokerEvent event)
            throws BrokerException
Copy constructor.

Throws:
BrokerNullParameterException - If event is null.
BrokerException
Method Detail

getTypeName

public java.lang.String getTypeName()
Get the fully qualified type name.


setTypeName

public void setTypeName(java.lang.String event_type_name)
                 throws BrokerException
Throws:
BrokerException

getBaseTypeName

public java.lang.String getBaseTypeName()
Get the type name without the scope qualification.


getScopeTypeName

public java.lang.String getScopeTypeName()
Get the scope of the event type name.


getClient

public BrokerClient getClient()
Get the event's client. Returns null if the event is not associated with a client.


getTypeDef

public BrokerTypeDef getTypeDef()
                         throws BrokerException
Get the event's type definition.

Throws:
BrokerInvalidTypeDefException - If the event is not associated with a valid client.
BrokerException

getStorageObject

public java.lang.Object getStorageObject()
Deprecated. As of Java API v6.5.

Get the storage object used by the event if the event was created using a Java object for storage. Returns null if the event is using internal storage.

If the event was created with an object instance, that instance will be returned. If the event was created with a Java class, the instance of that class created for the event will be returned.


toObject

public void toObject(java.lang.Object obj)
              throws BrokerException
Deprecated. As of Java API v6.5.

Sets all the fields from the current event into the given object. This method can be used to copy the contents of an event into an object for you. If the event is typechecked, then unset fields in the type definition are copied using their default values and any indicator ('$') data members are set appropriately.

Throws:
BrokerNullParameterException - If obj is null.
BrokerFieldNotFoundException - If a public data member exists in the object's class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If a public data member of the object's class has a different type than the field in the event type.
BrokerException

fromObject

public void fromObject(java.lang.Object obj,
                       boolean readOnly)
                throws BrokerException
Deprecated. As of Java API v6.5.

Gets all the fields from the given object and sets them into the event. This method can be used to copy an object into an event for you. If any indicator ('$') data members on the class exist and are false, those fields are not set in the event.

Throws:
BrokerNullParameterException - If obj is null.
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the object's class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the object's class is a different type than the same field in the event type.
BrokerException

fromObject

public void fromObject(java.lang.Object obj)
                throws BrokerException
Deprecated. As of Java API v6.5.

Gets all the fields from the given object and sets them into the event. This method can be used to copy an object into an event for you. If any indicator ('$') data members on the class exist and are false, those fields are not set in the event.

Throws:
BrokerNullParameterException - If obj is null.
BrokerFieldNotFoundException - If the event is typechecked and a public data member exists in the object's class when there is no field in the event type using the same name.
BrokerFieldTypeMismatchException - If the event is typechecked and a data member in the object's class is a different type than the same field in the event type.
BrokerException

getPublishSequenceNumber

public long getPublishSequenceNumber()
Get the publishing sequence number for this event.


setPublishSequenceNumber

public void setPublishSequenceNumber(long seqn)
Set the publishing sequence number for this event. This is called prior to publishing an event. A zero or negative value (or not calling this) indicates to the Broker that you do not wish the publish sequence numbering rules to be applied to this event. Non-zero events are discarded by the broker if they have a sequence number less than or equal to the highest number already processed by the broker for this client.


getReceiptSequenceNumber

public long getReceiptSequenceNumber()
Get the receipt sequence number (as set by the broker) for this event. Always zero if not received from the broker, or for events being stored volatile in the broker.


getRedeliveryCount

public int getRedeliveryCount()
Get the redelivery count (as set by the broker) for this event. Always -1 if redelivery counting is not done, or for events being stored volatile in the broker.


getEventId

public long getEventId()
Get the event ID (as set by the broker) for this event. Always zero if not received from the broker, or if the event was published by a client using a pre-3.0 release of the product.


getRetrievedStatus

public boolean getRetrievedStatus()
                           throws BrokerException
Get the acknowledgement status of the event. For use only on events that are returned as a result of peek request. Returns true if the event was retrieved by one of the client sessions. Otherwise, returns false.

Throws:
BrokerNotImplementedException - If the event was not a result of a peek operation.
BrokerException

getRetrievedSessionId

public int getRetrievedSessionId()
                          throws BrokerException
Get the session id on which this event was retrieved. For use only on events that are returned as a result of peek request. Returns the session id of the client session that retrieved this event.

Throws:
BrokerNotImplementedException - If the event was not a result of a peek operation.
BrokerException

getSubscriptionIds

public int[] getSubscriptionIds()
Get the subscription IDs for an event. Returns null for a locally created event; a zero length array for an event delivered to this client; an array of subscription ids for an event that matched one or more subscriptions.


setClientValidation

public void setClientValidation(boolean client_validation)
This method will enable/disable client side validation. By default the client side validation is set to do Full validation. Client will not follow the validation type set on event type if client_validation is set to false. To get the client to follow the broker and do validation based on the validation type set on the event, client_validation needs to be set to true.


getClientValidation

public boolean getClientValidation()

getFieldType

public short getFieldType(java.lang.String field_name)
                   throws BrokerException
Gets the type for the specified field. Sequence fields can use "[]" if it is the last part of the name on an event without a client, or always on events with a client.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setByteField

public void setByteField(java.lang.String field_name,
                         byte value)
                  throws BrokerException
Sets the value of a byte field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setShortField

public void setShortField(java.lang.String field_name,
                          short value)
                   throws BrokerException
Sets the value of a short field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setIntegerField

public void setIntegerField(java.lang.String field_name,
                            int value)
                     throws BrokerException
Sets the value of an integer field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setLongField

public void setLongField(java.lang.String field_name,
                         long value)
                  throws BrokerException
Sets the value of a long field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setFloatField

public void setFloatField(java.lang.String field_name,
                          float value)
                   throws BrokerException
Sets the value of a float field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setDoubleField

public void setDoubleField(java.lang.String field_name,
                           double value)
                    throws BrokerException
Sets the value of a double field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setBooleanField

public void setBooleanField(java.lang.String field_name,
                            boolean value)
                     throws BrokerException
Sets the value of a boolean field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setDateField

public void setDateField(java.lang.String field_name,
                         BrokerDate value)
                  throws BrokerException
Sets the value of a date field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerException

setCharField

public void setCharField(java.lang.String field_name,
                         char value)
                  throws BrokerException
Sets the value of a char field. Characters which do not map to ANSI/ISO-Latin-1 will become underscores ('_').

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setUCCharField

public void setUCCharField(java.lang.String field_name,
                           char value)
                    throws BrokerException
Sets the value of a unicode char field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

setStringField

public void setStringField(java.lang.String field_name,
                           java.lang.String value)
                    throws BrokerException
Sets the value of a string field. Characters which do not map to ANSI/ISO-Latin-1 will become underscores ('_'). Can also be used to set the value of a unicode string field if your event is typechecked or the named field already is set to a unicode value.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerException

setUCStringField

public void setUCStringField(java.lang.String field_name,
                             java.lang.String value)
                      throws BrokerException
Sets the value of a unicode string field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerException

setStringFieldToSubstring

public void setStringFieldToSubstring(java.lang.String field_name,
                                      int offset,
                                      int nc,
                                      java.lang.String value)
                               throws BrokerException
Sets the value of a string field to a substring of another string. If nc is AUTO_SIZE (-1), take the rest of the string. Characters which do not map to ANSI/ISO-Latin-1 will become underscores ('_').

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If offset is not within the size of the string, or if nc would exceed the size of the string.
BrokerException

setUCStringFieldToSubstring

public void setUCStringFieldToSubstring(java.lang.String field_name,
                                        int offset,
                                        int nc,
                                        java.lang.String value)
                                 throws BrokerException
Sets the value of a unicode string field to a substring of another string. If nc is AUTO_SIZE (-1), take the rest of the string.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If offset is not within the size of the string, or if nc would exceed the size of the string.
BrokerException

setByteSeqField

public void setByteSeqField(java.lang.String field_name,
                            int src_offset,
                            int dest_offset,
                            int n,
                            byte[] value)
                     throws BrokerException
Sets the value of a subrange of a byte sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setShortSeqField

public void setShortSeqField(java.lang.String field_name,
                             int src_offset,
                             int dest_offset,
                             int n,
                             short[] value)
                      throws BrokerException
Sets the value of a subrange of a short sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setIntegerSeqField

public void setIntegerSeqField(java.lang.String field_name,
                               int src_offset,
                               int dest_offset,
                               int n,
                               int[] value)
                        throws BrokerException
Sets the value of a subrange of an integer sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setLongSeqField

public void setLongSeqField(java.lang.String field_name,
                            int src_offset,
                            int dest_offset,
                            int n,
                            long[] value)
                     throws BrokerException
Sets the value of a subrange of a long sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setFloatSeqField

public void setFloatSeqField(java.lang.String field_name,
                             int src_offset,
                             int dest_offset,
                             int n,
                             float[] value)
                      throws BrokerException
Sets the value of a subrange of a float sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setDoubleSeqField

public void setDoubleSeqField(java.lang.String field_name,
                              int src_offset,
                              int dest_offset,
                              int n,
                              double[] value)
                       throws BrokerException
Sets the value of a subrange of a double sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setBooleanSeqField

public void setBooleanSeqField(java.lang.String field_name,
                               int src_offset,
                               int dest_offset,
                               int n,
                               boolean[] value)
                        throws BrokerException
Sets the value of a subrange of a boolean sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setDateSeqField

public void setDateSeqField(java.lang.String field_name,
                            int src_offset,
                            int dest_offset,
                            int n,
                            BrokerDate[] value)
                     throws BrokerException
Sets the value of a subrange of a date sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null, or if any of the elements of the value array are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setCharSeqField

public void setCharSeqField(java.lang.String field_name,
                            int src_offset,
                            int dest_offset,
                            int n,
                            char[] value)
                     throws BrokerException
Sets the value of a subrange of a char sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set. Characters which do not map to ANSI/ISO-Latin-1 will become underscores ('_').

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setUCCharSeqField

public void setUCCharSeqField(java.lang.String field_name,
                              int src_offset,
                              int dest_offset,
                              int n,
                              char[] value)
                       throws BrokerException
Sets the value of a subrange of a unicode char sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setStringSeqField

public void setStringSeqField(java.lang.String field_name,
                              int src_offset,
                              int dest_offset,
                              int n,
                              java.lang.String[] value)
                       throws BrokerException
Sets the value of a subrange of a string sequence field. Can also be used to set the value of a unicode string sequence field if your event is typechecked or the named field already is set to a unicode string sequence value. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set. Characters which do not map to ANSI/ISO-Latin-1 will become underscores ('_').

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null, or if any of the elements of the value array are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setUCStringSeqField

public void setUCStringSeqField(java.lang.String field_name,
                                int src_offset,
                                int dest_offset,
                                int n,
                                java.lang.String[] value)
                         throws BrokerException
Sets the value of a subrange of a unicode string sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null, or if any of the elements of the value array are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setSequenceField

public void setSequenceField(java.lang.String field_name,
                             short field_type,
                             int src_offset,
                             int dest_offset,
                             int n,
                             java.lang.Object value)
                      throws BrokerException
Sets the value of a subrange of a sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set. The 'value' parameter should be the proper kind of array to match the 'field_type' parameter. For 'field_type' set to BrokerTypeDef.FIELD_TYPE_*: BYTE = byte[], SHORT = short[], INT = int[], LONG = long[], FLOAT = float[], DOUBLE = double[], BOOLEAN = boolean[], DATE = BrokerDate[], CHAR = char[], UNICODE_CHAR = char[], STRING = String[], UNICODE_STRING = String[], STRUCT = BrokerEvent[]. A sequence of sequences cannot be set with this operation. A value of STRING can also be used to set the value of a UNICODE_STRING sequence field if your event is typechecked or the named field already is set to a unicode string sequence value.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or if the value field is not of the type required for the field_type specified, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If field_type is BrokerTypeDef.FIELD_TYPE_SEQUENCE or is not a supported field type.
BrokerNullParameterException - If field_name or value are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setSequenceFieldSize

public void setSequenceFieldSize(java.lang.String field_name,
                                 int size)
                          throws BrokerException
Set the size of a sequence field.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not a sequence, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If size is less than zero.
BrokerException

setStructFieldFromEvent

public void setStructFieldFromEvent(java.lang.String field_name,
                                    BrokerEvent value)
                             throws BrokerException
Sets the value of a structure field. The value event should contain the appropriate fields for the structure. The type of the value event and any envelope fields on the value event are ignored. If field_name is "" or null, the top level of the event is modified.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not a structure, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If value is null.
BrokerException

setStructSeqFieldFromEvents

public void setStructSeqFieldFromEvents(java.lang.String field_name,
                                        int src_offset,
                                        int dest_offset,
                                        int n,
                                        BrokerEvent[] value)
                                 throws BrokerException
Sets the value of a structure sequence field. The value events should contain the appropriate fields for the structures being set. The type of the value events and any envelope fields on the value events are ignored. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or value are null, or if any of the elements in the value array are null.
BrokerOutOfRangeException - If src_offset is not within the size of the the passed in value, if dest_offset is less than zero, or if n is less than -1.
BrokerException

setField

public void setField(java.lang.String field_name,
                     short field_type,
                     java.lang.Object value)
              throws BrokerException
Sets the value of a field. The 'value' parameter should be the proper kind of object to match the 'field_type' parameter. For 'field_type' set to BrokerTypeDef.FIELD_TYPE_*: BYTE = Byte, SHORT = Short, INT = Integer, LONG = Long, FLOAT = Float, DOUBLE = Double, BOOLEAN = Boolean, DATE = BrokerDate, CHAR = Character, UNICODE_CHAR = Character, STRING = String, UNICODE_STRING = String, STRUCT = BrokerEvent. A sequence cannot be set with this operation. Use setSequenceField() for sequences. A value of STRING can also be used to set the value of a UNICODE_STRING field if your event is typechecked or the named field already is set to a unicode string value.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the value object type does not match the field_type specified, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If field_type is BrokerTypeDef.FIELD_TYPE_SEQUENCE or is not a supported field type.
BrokerNullParameterException - If field_name or value are null.
BrokerException

setField

public void setField(java.lang.String field_name,
                     BrokerField field)
              throws BrokerException
Sets the value of a field. Does not accept sequences. The 'value' field in the BrokerField should be the proper kind of object to match the 'field_type' field. For 'field_type' set to BrokerTypeDef.FIELD_TYPE_*: BYTE = Byte, SHORT = Short, INT = Integer, LONG = Long, FLOAT = Float, DOUBLE = Double, BOOLEAN = Boolean, DATE = BrokerDate, CHAR = Character, UNICODE_CHAR = Character, STRING= String, UNICODE_STRING = String, STRUCT = BrokerEvent. A sequence cannot be set with this operation. Use setSequenceField() for sequences.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the value object type does not match the field_type specified, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the field_type field is BrokerTypeDef.FIELD_TYPE_SEQUENCE or is not a supported field type.
BrokerNullParameterException - If field_name, field, or the value field in 'field' are null.
BrokerException

getByteField

public byte getByteField(java.lang.String field_name)
                  throws BrokerException
Get the value of a byte field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getShortField

public short getShortField(java.lang.String field_name)
                    throws BrokerException
Get the value of a short field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getIntegerField

public int getIntegerField(java.lang.String field_name)
                    throws BrokerException
Get the value of an integer field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getLongField

public long getLongField(java.lang.String field_name)
                  throws BrokerException
Get the value of a long field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getFloatField

public float getFloatField(java.lang.String field_name)
                    throws BrokerException
Get the value of a float field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getDoubleField

public double getDoubleField(java.lang.String field_name)
                      throws BrokerException
Get the value of a double field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getBooleanField

public boolean getBooleanField(java.lang.String field_name)
                        throws BrokerException
Get the value of a boolean field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getDateField

public BrokerDate getDateField(java.lang.String field_name)
                        throws BrokerException
Get the value of a date field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getCharField

public char getCharField(java.lang.String field_name)
                  throws BrokerException
Get the value of a char field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getUCCharField

public char getUCCharField(java.lang.String field_name)
                    throws BrokerException
Get the value of a unicode char field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getStringField

public java.lang.String getStringField(java.lang.String field_name)
                                throws BrokerException
Get the value of a string field. Can also be used to get the value of a unicode string field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getUCStringField

public java.lang.String getUCStringField(java.lang.String field_name)
                                  throws BrokerException
Get the value of a unicode string field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getByteSeqField

public byte[] getByteSeqField(java.lang.String field_name,
                              int offset,
                              int max_n)
                       throws BrokerException
Get the value of a byte sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getShortSeqField

public short[] getShortSeqField(java.lang.String field_name,
                                int offset,
                                int max_n)
                         throws BrokerException
Get the value of a short sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getShortSeqFieldInternal

public short[] getShortSeqFieldInternal(java.lang.String field_name,
                                        int offset,
                                        int max_n)
                                 throws BrokerException
Throws:
BrokerException

getIntegerSeqField

public int[] getIntegerSeqField(java.lang.String field_name,
                                int offset,
                                int max_n)
                         throws BrokerException
Get the value of an integer sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getLongSeqField

public long[] getLongSeqField(java.lang.String field_name,
                              int offset,
                              int max_n)
                       throws BrokerException
Get the value of a long sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getFloatSeqField

public float[] getFloatSeqField(java.lang.String field_name,
                                int offset,
                                int max_n)
                         throws BrokerException
Get the value of a float sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getDoubleSeqField

public double[] getDoubleSeqField(java.lang.String field_name,
                                  int offset,
                                  int max_n)
                           throws BrokerException
Get the value of a double sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getBooleanSeqField

public boolean[] getBooleanSeqField(java.lang.String field_name,
                                    int offset,
                                    int max_n)
                             throws BrokerException
Get the value of a boolean sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getDateSeqField

public BrokerDate[] getDateSeqField(java.lang.String field_name,
                                    int offset,
                                    int max_n)
                             throws BrokerException
Get the value of a date sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getCharSeqField

public char[] getCharSeqField(java.lang.String field_name,
                              int offset,
                              int max_n)
                       throws BrokerException
Get the value of a char sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getUCCharSeqField

public char[] getUCCharSeqField(java.lang.String field_name,
                                int offset,
                                int max_n)
                         throws BrokerException
Get the value of a unicode char sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getStringSeqField

public java.lang.String[] getStringSeqField(java.lang.String field_name,
                                            int offset,
                                            int max_n)
                                     throws BrokerException
Get the value of a string sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values. Can also be used to get the value of a unicode string sequence field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getUCStringSeqField

public java.lang.String[] getUCStringSeqField(java.lang.String field_name,
                                              int offset,
                                              int max_n)
                                       throws BrokerException
Get the value of a unicode string sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getSequenceFieldSize

public int getSequenceFieldSize(java.lang.String field_name)
                         throws BrokerException
Get the size of a sequence field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

getSequenceField

public BrokerField getSequenceField(java.lang.String field_name,
                                    int offset,
                                    int max_n)
                             throws BrokerException
Get the value of a sequence field. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values. The 'value' field in the BrokerField will be set to match the 'field_type' field. For 'field_type' set to BrokerTypeDef.FIELD_TYPE_*: BYTE = byte[], SHORT = short[], INT = int[], LONG = long[], FLOAT = float[], DOUBLE = double[], BOOLEAN = boolean[], DATE = BrokerDate[], CHAR = char[], UNICODE_CHAR = char[], UNICODE_STRING = String[], STRING= String[], STRUCT = BrokerEvent[]. Cannot get a sequence of sequences with this operation.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the field is a sequence of sequences.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getStructFieldAsEvent

public BrokerEvent getStructFieldAsEvent(java.lang.String field_name)
                                  throws BrokerException
Get the value of a structure field. The event will contain the appropriate fields and its type name will be "struct_value". If field_name is "" or null, the top level of the event is returned.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

getStructSeqFieldAsEvents

public BrokerEvent[] getStructSeqFieldAsEvents(java.lang.String field_name,
                                               int offset,
                                               int max_n)
                                        throws BrokerException
Get the value of a structure sequence field. The events will not be typechecked and they will contain the appropriate fields from the structs. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerException

getField

public BrokerField getField(java.lang.String field_name)
                     throws BrokerException
Get the value of field. The 'value' field in the BrokerField will be set to match the 'field_type' field. For 'field_type' set to BrokerTypeDef.FIELD_TYPE_*: BYTE = Byte, SHORT = Short, INT = Integer, LONG = Long, FLOAT = Float, DOUBLE = Double, BOOLEAN = Boolean, DATE = BrokerDate, CHAR = Character, UNICODE_CHAR = Character, STRING= String, UNICODE_STRING = String, STRUCT = BrokerEvent. Cannot get a sequence with this operation.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the field is a sequence.
BrokerNullParameterException - If field_name is null.
BrokerException

getFieldNames

public java.lang.String[] getFieldNames(java.lang.String field_name)
                                 throws BrokerException
Get the list of field names in an event. If field_name is null or "", it gets the fields at the top level of the event. Otherwise, the field_name should refer to a structure sub-field and it will return the names at that level. Non-structured types will return zero names.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

isFieldSet

public boolean isFieldSet(java.lang.String field_name)
                   throws BrokerException
Determine if the specified field is set in the event. For non-typechecked events, this is merely whether the field exists or not. For typechecked events, this tells if the field has been assigned a value or is simply defaulting to a value because it was not set.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

isFieldSetInternal

public boolean isFieldSetInternal(java.lang.String field_name)
                           throws BrokerException
Throws:
BrokerException

clear

public void clear()
Clears all fields of the event so it can be re-used.


clearField

public void clearField(java.lang.String field_name)
                throws BrokerException
Clear (un-set) a field in the event.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

clearField

public void clearField(java.lang.String field_name,
                       boolean ignoreEx)
                throws BrokerException
Clear (un-set) a field in the event. Will not throw an exception if field is not found. If fieldExists is true

Parameters:
field_name - is the field that needs to be cleared from event.
ignoreEx - set to true, no exception is thrown if field is not found ignoreEx is set to false, exception is thrown if field is not found.
Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event and ignoreEx is set to false.
BrokerFieldTypeMismatchException - If the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerException

clearFieldInternal

public void clearFieldInternal(java.lang.String field_name,
                               boolean ignoreEx)
                        throws BrokerException
Throws:
BrokerException

validate

public void validate(BrokerClient client)
              throws BrokerException
Validate event in the context of the specified client. This can be used on non-typechecked events to typecheck them, or on typechecked events to check if they would be valid for a client other than the one they were created with. An event passes validation if its event type exists on the broker and if it only contains fields which are properly named and typed for that event type.

Throws:
BrokerFieldTypeMismatchException - If the event does not pass validation.
BrokerInvalidClientException - If the client parameter is null and the event is not typechecked.
BrokerException

getTag

public int getTag()
           throws BrokerException
Get the event's 'tag' envelope field. This is equivalent to getIntegerField("_env.tag"), but it can be more convenient.

Throws:
BrokerFieldNotFoundException - If "_env.tag" is not set on the event.
BrokerException

setTag

public void setTag(int tag)
            throws BrokerException
Set the event's 'tag' envelope field. This is the same as setIntegerField("_env.tag",tag), but it can be more convenient.

Throws:
BrokerException

isLastReply

public boolean isLastReply()
Determines if the given event is the last event in a reply sequence. Returns true if the event has appSeqn==appLastSeqn, if the event is an Adapter::error event, or if either of appSeqn or appLastSeqn is not set. Returns false if of the above is not true.


isErrorReply

public boolean isErrorReply()
Determine if the given event is an error reply. Returns true if the event is of type Adapter::error. Returns false if of the above is not true.


isAckReply

public boolean isAckReply()
Determine if the given event is an acknowledgement reply. Returns true if the event is of type Adapter::ack. Returns false if of the above is not true.


isNullReply

public boolean isNullReply()
Determine if the given event is a 'null' event. This means that although The event is a data reply event, it contains no actual data and is just a placeholder to indicate that there will be no data replies. Returns true if the event has appSeqn==-1 and appLastSeqn==-1. Returns false if of the above is not true.


hasBeenModified

public boolean hasBeenModified()
Check if event has been modified since last time the modification flag was cleared.


clearModificationFlag

public void clearModificationFlag()
Clear the modification flag.


setModificationFlag

public void setModificationFlag()
Set the modification flag.


toString

public java.lang.String toString()
Get event content as a string which includes newlines formatted for the US English locale.

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.util.Locale locale)
Get event content as a string which includes newlines formatted for the specified locale.


toString

public java.lang.String toString(int indent_level)
Get event content as a string suitable for human viewing formatted for the US English locale. The "indent_level" is the number of 4-space indents that the output should be generated for.


toString

public java.lang.String toString(int indent_level,
                                 java.util.Locale locale)
Get event content as a string suitable for human viewing formatted for the specified locale. The "indent_level" is the number of 4-space indents that the output should be generated for.


toLocalizedString

public java.lang.String toLocalizedString()
Get event content as a string which includes newlines formatted for the default locale. Equivalent to toString(java.util.Locale.getDefault())


toFormattedString

public java.lang.String toFormattedString(java.lang.String formatString)
                                   throws BrokerException
Format an event string. Take the format_string and replace all references to event fields with their values. Equivalent to toFormattedString(formatString, java.util.Locale.US). See class BrokerFormat for details.

Throws:
BrokerException

toFormattedString

public java.lang.String toFormattedString(java.lang.String formatString,
                                          java.util.Locale locale)
                                   throws BrokerException
Format an event string. Take the format_string and replace all references to event fields with their values formatted for the specified locale. See class BrokerFormat for details.

Throws:
BrokerException

toLocalizedFormattedString

public java.lang.String toLocalizedFormattedString(java.lang.String formatString)
                                            throws BrokerException
Format an event string. Take the format_string and replace all references to event fields with their values. Event field values will be formatted for the default locale. Equivalent to toFormattedString(formatString, java.util.Locale.getDefault()) See class BrokerFormat for details.

Throws:
BrokerException

stringToANSI

public static java.lang.String stringToANSI(java.lang.String st)
Convert a String object to another String which only contains characters which cleanly map to ANSI 8-bit characters. All unicode characters that do not map are replaced with '\\u' escapes.


stringFromANSI

public static java.lang.String stringFromANSI(java.lang.String st)
Convert a String object which contains only ANSI 8-bit characters, to another String which contains unicode characters. Converts uses of '\\u' escapes to proper characters.


toBinData

public byte[] toBinData()
Get out the event's data as a byte array. This is useful for storage on disk or in a database.


fromBinData

public static BrokerEvent fromBinData(BrokerClient client,
                                      byte[] data,
                                      java.lang.String event_type_name)
                               throws BrokerException
Create an event using a byte array given out by toBinData().

Throws:
BrokerCorruptDataException - If data is not a valid event.
BrokerNoPermissionException - If a client is specified and the client does not have permission to publish or subscribe to the event type.
BrokerNullParameterException - If data is null.
BrokerUnknownEventTypeException - If a client is specified and the broker does not have an event type with the specified name.
BrokerException

fromBinData

public static BrokerEvent fromBinData(BrokerClient client,
                                      byte[] data)
                               throws BrokerException
Throws:
BrokerException

getNativeEvent

protected COM.activesw.api.client.NativeEvent getNativeEvent()

getBodyIterator

protected COM.activesw.api.client.NativeFieldIterator getBodyIterator()

getEnvelopeIterator

protected COM.activesw.api.client.NativeFieldIterator getEnvelopeIterator()

getBody

protected COM.activesw.api.client.NativeStruct getBody()

getEnvelope

protected COM.activesw.api.client.NativeStruct getEnvelope()

getWireEvent

protected byte[] getWireEvent()

setWireEvent

public void setWireEvent(byte[] w_event)

toWireEvent

public byte[] toWireEvent()
                   throws BrokerException
Throws:
BrokerException

checkSetEnvField

protected static void checkSetEnvField(java.lang.String field_name,
                                       java.lang.String full_field_name)
                                throws BrokerException
Throws:
BrokerException

getEventField

public BrokerEvent getEventField(java.lang.String field_name)
                          throws BrokerException
Get the value of an event field. If field_name is "" or null, the top level of this event is returned.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

setEventField

public void setEventField(java.lang.String field_name,
                          BrokerEvent value)
                   throws BrokerException
Sets the value of an event field. The event specified by value should contain an event of the appropriate type. This method is unsupported for event that are not typechecked. Events that are not typechecked should use setStructFieldFromEvent instead. Envelope fields in the event specified by value will be ignored.

Throws:
BrokerFieldNotFoundException - If the event is associated with a client and the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not a structure, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If value is null.
BrokerNotImplementedException - If this event is not typechecked.
BrokerException

getEventSeqField

public BrokerEvent[] getEventSeqField(java.lang.String field_name,
                                      int offset,
                                      int max_n)
                               throws BrokerException
Get the value of an event sequence field. The events will be typechecked. Gets the entire length if max_n is ENTIRE_SEQUENCE (-1), otherwise gets up to max_n values. This method is unsupported for event that are not typechecked. Events that are not typechecked should use getStructSeqFieldAsEvents instead.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerNotImplementedException - If this event is not typechecked.
BrokerException

setEventSeqField

public void setEventSeqField(java.lang.String field_name,
                             int src_offset,
                             int dest_offset,
                             int n,
                             BrokerEvent[] value)
                      throws BrokerException
Set the value of an event sequence field. The 'n' parameter can be set to AUTO_SIZE (-1) to use the actual array size. The 'dest_offset' parameter can be set to ENTIRE_SEQUENCE (-1) to set the sequence size to the number of elements being set. This method is unsupported for event that are not typechecked. Events that are not typechecked should use getStructSeqFieldAsEvents instead. Envelope fields in the event specified by value will be ignored.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the field is not of the specified type, or the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name is null.
BrokerOutOfRangeException - If offset is less than zero or greater than the sequence size, or max_n is less than zero.
BrokerNotImplementedException - If this event is not typechecked.
BrokerException

setStringProperty

public void setStringProperty(java.lang.String property_name,
                              java.lang.String value)
                       throws BrokerException
Throws:
BrokerException

setLongProperty

public void setLongProperty(java.lang.String property_name,
                            long value)
                     throws BrokerException
Throws:
BrokerException

setShortProperty

public void setShortProperty(java.lang.String property_name,
                             short value)
                      throws BrokerException
Throws:
BrokerException

setFloatProperty

public void setFloatProperty(java.lang.String property_name,
                             float value)
                      throws BrokerException
Throws:
BrokerException

setIntProperty

public void setIntProperty(java.lang.String property_name,
                           int value)
                    throws BrokerException
Throws:
BrokerException

setDoubleProperty

public void setDoubleProperty(java.lang.String property_name,
                              double value)
                       throws BrokerException
Throws:
BrokerException

setBooleanProperty

public void setBooleanProperty(java.lang.String property_name,
                               boolean value)
                        throws BrokerException
Throws:
BrokerException

setByteProperty

public void setByteProperty(java.lang.String property_name,
                            byte value)
                     throws BrokerException
Throws:
BrokerException

setNullProperty

public void setNullProperty(java.lang.String property_name,
                            java.lang.String value)
                     throws BrokerException
Throws:
BrokerException

getStringProperty

public java.lang.String getStringProperty(java.lang.String property_name)
                                   throws BrokerException
Throws:
BrokerException

getIntProperty

public int getIntProperty(java.lang.String property_name)
                   throws BrokerException
Throws:
BrokerException

getDoubleProperty

public double getDoubleProperty(java.lang.String property_name)
                         throws BrokerException
Throws:
BrokerException

getShortProperty

public short getShortProperty(java.lang.String property_name)
                       throws BrokerException
Throws:
BrokerException

getByteProperty

public byte getByteProperty(java.lang.String property_name)
                     throws BrokerException
Throws:
BrokerException

getFloatProperty

public float getFloatProperty(java.lang.String property_name)
                       throws BrokerException
Throws:
BrokerException

getBooleanProperty

public boolean getBooleanProperty(java.lang.String property_name)
                           throws BrokerException
Throws:
BrokerException

getLongProperty

public long getLongProperty(java.lang.String property_name)
                     throws BrokerException
Throws:
BrokerException

getProperty

public java.lang.Object getProperty(java.lang.String property_name)
                             throws BrokerException
Throws:
BrokerException

getPropertyNames

public java.lang.String[] getPropertyNames(java.lang.String field_name)
                                    throws BrokerException
Get the list of property names in an event. Returns a list of names that are not defined in the broker.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event.
BrokerFieldTypeMismatchException - If the name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

getPriority

public int getPriority()
Gets the priority of the event. The values are in the HIGH_PRIORITY (value of 9) - LOW_PRIORITY (value of 0) range. The deafult value is DEFAULT_PRIORITY (4)


setPriority

public void setPriority(int priority)
                 throws BrokerOutOfRangeException
Sets the priority of the event. The legal values are in the HIGH_PRIORITY (value of 9) - LOW_PRIORITY (value of 0) range.

Throws:
BrokerOutOfRangeException - - the specified priority is not in the legal range

webMethods Broker Administration Java API
Version 9.5.1.0.171 091713


Copyright © 2001 - 2013 Software AG Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their suppliers.