Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.event.common
Interface EventTopicDef

public interface EventTopicDef

Representation of topics in the WebLogic Server Event Topic tree. Provides operations for creating subtopics, submitting event messages, and submitting registrations of interest in events.

Author:
  Copyright (c) 1995-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 BEA Systems, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `EventServicesDef`

Field Summary
`static java.lang.String` | `DELIM` Sets the delimiter for representation of a topic's place in the hierarchy of the topic tree.
`static int` | `DURABLE` Represents the lifetime of a topic to end when all of the pending events have been evaluated and there are no more registrations of interest for the topic.
`static int` | `EPHEMERAL` Represents the lifetime of a topic to end when there are no more registrations of interest for the topic, even if there are pending events that have not yet been evaluated.
`static int` | `PERSISTENT` Represents the lifetime of a topic to persistent even though there are no registrations of interest for the topic and there are no pending events to be evaluated.

Method Summary
`EventTopicDef` | `getEventTopic(java.lang.String subTopic)` Creates a subtopic in the topic tree.
`EventTopicDef` | `getEventTopic(java.lang.String subTopic, int lifetime)` Creates a subtopic with the specified lifetime.
`java.lang.String` | `getName()` Returns the string representation of a topic.
`int` | `getRegistrationCount()` Returns the number of registrations that are associated with this EventTopic.
`EventRegistrationDef` | `register(Evaluate evaluate, Action action)` Registers interest in an events corresponding to a topic.
`EventRegistrationDef` | `register(Evaluate evaluate, Action action, boolean sink, boolean phase, int count)` Registers interest in an events corresponding to a topic.
`java.lang.String` | `submit(java.lang.Object body)` Submits an EventMessage to the WebLogic Server for a topic.

Field Detail

### EPHEMERAL

    public static final int EPHEMERAL

  Represents the lifetime of a topic to end when there are no more registrations of interest for the topic, even if there are pending events that have not yet been evaluated.

### DURABLE

    public static final int DURABLE

  Represents the lifetime of a topic to end when all of the pending events have been evaluated and there are no more registrations of interest for the topic.

### PERSISTENT

    public static final int PERSISTENT

  Represents the lifetime of a topic to persistent even though there are no registrations of interest for the topic and there are no pending events to be evaluated.

### DELIM

    public static final java.lang.String DELIM

  Sets the delimiter for representation of a topic's place in the hierarchy of the topic tree.

Method Detail

### getName

    public java.lang.String getName()

  Returns the string representation of a topic.

  Returns:
    Name of a topic

### submit

    public java.lang.String submit(java.lang.Object body)
                            throws EventGenerationException

  Submits an EventMessage to the WebLogic Server for a topic.

  Parameters:
    `body` - Object to submitted as an EventMessage
  Returns:
    Confirmation string from the WebLogic Server
  Throws:
    EventGenerationException - if the event cannot be submitted

### getEventTopic

    public EventTopicDef getEventTopic(java.lang.String subTopic)
                                throws T3Exception

  Creates a subtopic in the topic tree. The subTopic will be created relative to a topic, and may have intermediary nodes. For example, If a topic is "a.b.c", you may call getEventTopic("d.e.f"), and the topic "a.b.c.d.e.f" will be returned.

  Parameters:
    `subTopic` - String representing a subtopic
  Returns:
    subTopic
  Throws:
    T3Exception - if an invalid topic is supplied

### getEventTopic

    public EventTopicDef getEventTopic(java.lang.String subTopic,
                                       int lifetime)
                                throws T3Exception

  Creates a subtopic with the specified lifetime. EventTopicDef.EPHEMERAL will cause the topic to disappear after the last deregistration. If EventTopicDef.DURABLE, the topic will remain in the tree when there are no registrations. EventTopicDef.PERSISTENT is not yet implemented.

  Parameters:
    `subTopic` - String representing a subTopic
    `lifetime` - How long a topic will remain in the topic tree
  Returns:
    subTopic
  Throws:
    T3Exception - if an invalid topic is supplied

### register

    public EventRegistrationDef register(Evaluate evaluate,
                                         Action action)
                                  throws EventRegistrationException

  Registers interest in an events corresponding to a topic. Returns an EventRegistrationDef object which can be used to unregister interest.

  Parameters:
    `evaluate` - Evaluate object for the registration
    `action` - Action object for the registration
  Returns:
    EventRegistrationDef
  Throws:
    EventRegistrationException - if the event registration cannot be created

### register

    public EventRegistrationDef register(Evaluate evaluate,
                                         Action action,
                                         boolean sink,
                                         boolean phase,
                                         int count)
                                  throws EventRegistrationException

  Registers interest in an events corresponding to a topic.

  Parameters:
    `evaluate` - An Evaluate object that implements weblogic.event.evaluators.EvaluateDef interface
    `action` - An Action object that implements weblogic.event.actions.ActionDef interface
    `sink` - true if the registration should receive notification of every event in which it has registered interest, as well as notification of events in any more specific topics
    `phase` - true if this registration is interested in the "true" state of the evaluation
    `count` - Specifies the number of events that this registration should receive before automatically unregistering itself; specify weblogic.event.common.EventRegistrationDef.UNCOUNTED for an unlimited registration
  Returns:
    EventRegistration
  Throws:
    EventRegistrationException - if the event registration cannot be created

### getRegistrationCount

    public int getRegistrationCount()
                             throws EventRegistrationException

  Returns the number of registrations that are associated with this EventTopic. Does not include registrations above it in the topic tree that may also receive events delivered to this topic.

  Returns:
    Number of event registrations for topic
  Throws:
    EventRegistrationException - if an exception occurs during processing.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD