Class BrokerEvent

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

public class BrokerEvent extends Object implements 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:
  • Field Details

    • ENTIRE_SEQUENCE

      public static final int ENTIRE_SEQUENCE
      See Also:
    • AUTO_SIZE

      public static final int AUTO_SIZE
      See Also:
    • ENVELOPE_FLAGS_INSERTED_EVENT

      public static final int ENVELOPE_FLAGS_INSERTED_EVENT
      See Also:
    • ENVELOPE_FLAGS_LOGGED_EVENT

      public static final int ENVELOPE_FLAGS_LOGGED_EVENT
      See Also:
    • ENVELOPE_FLAGS_OPEN_VALIDATION

      public static final int ENVELOPE_FLAGS_OPEN_VALIDATION
      See Also:
    • ENVELOPE_FLAGS_NO_VALIDATION

      public static final int ENVELOPE_FLAGS_NO_VALIDATION
      See Also:
    • DEFAULT_PRIORITY

      public static final int DEFAULT_PRIORITY
      See Also:
    • HIGH_PRIORITY

      public static final int HIGH_PRIORITY
      See Also:
    • LOW_PRIORITY

      public static final int LOW_PRIORITY
      See Also:
    • 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 String event_type_name
    • the_client

      protected transient BrokerClient the_client
    • broker_host

      protected transient String broker_host
    • broker_name

      protected transient 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 Details

    • BrokerEvent

      public BrokerEvent(BrokerClient client, 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, String event_type_name, 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, String event_type_name, 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(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(String event_type_name, BrokerClusterPublisher bcp, 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(String event_type_name, BrokerClusterPublisher bcp, 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 Details