BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.event.common
Interface EventMessageDef


public interface EventMessageDef

Interface for EventMessages. Use the methods in this class to submit, display, etc. an EventMessage, after manufacturing it by calling the getEventMessage() method in weblogic.event.common.EventServicesDef, which defines an event services factory.

Here's an example of how this interface is used in the process of submitting an event to the WebLogic Server:

   // Create a T3Client
   T3Client t3 = new T3Client("t3://host:port");

   // Manufacture an EventRegistration object for the client
   EventMessageDef em = t3.services.events()
               .getEventMessage("STOCKS", params);

   // Submit the event with methods from this class
   String confirmation = em.submit();
 

Author:
Copyright (c) 1996-1998, WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved. All Rights Reserved.
See Also:
T3ServicesDef, EventServicesDef

Method Summary
 java.lang.String display()
          Displays a human-readable representation of an EventMessage.
 java.lang.String dump()
          Displays a representation of an EventMessage.
 java.lang.Object getObject()
          Returns the message body
 ParamSet getParameters()
          Returns the parameters associated with an EventMessage.
 EventRegistrationDef getRegistration()
          Returns the EventRegistration associated with an EventMessage.
 java.lang.String getTopic()
          Returns the Topic associated with an EventMessage.
 boolean getTracing()
          Determines whether tracing has been enabled for an EventMessage.
 void setObject(java.lang.Object body)
           
 boolean setParameters(ParamSet params)
          Sets the parameters associated with this event message.
 void setTracing(boolean enable)
          Turns on tracing for this EventMessage.
 java.lang.String submit()
          Submits an EventMessage to the event server.
 

Method Detail

submit

public java.lang.String submit()
                        throws EventGenerationException
Submits an EventMessage to the event server.

Returns:
Confirmation string from the event server
Throws:
EventGenerationException - if the event cannot be submitted

dump

public java.lang.String dump()
Displays a representation of an EventMessage.

Returns:
String display

display

public java.lang.String display()
Displays a human-readable representation of an EventMessage.

Returns:
String display

getParameters

public ParamSet getParameters()
Returns the parameters associated with an EventMessage.

Returns:
ParamSet object

setParameters

public boolean setParameters(ParamSet params)
Sets the parameters associated with this event message. The operation is not valid after the event is submitted, and therefore will have no effect during evaluate or action methods.

Parameters:
params - ParamSet associated with Event
Returns:
true if the operation succeeded

setObject

public void setObject(java.lang.Object body)

getObject

public java.lang.Object getObject()
Returns the message body

Returns:
Message body

getTopic

public java.lang.String getTopic()
Returns the Topic associated with an EventMessage.

Returns:
Topic name

getRegistration

public EventRegistrationDef getRegistration()
Returns the EventRegistration associated with an EventMessage. Used in an evaluate() or action() method to retrieve the registration which matched this Event.

Returns:
EventRegistration

setTracing

public void setTracing(boolean enable)
Turns on tracing for this EventMessage. If this is called with a "true" argument, then information about the registration will be written to System.out.

Parameters:
enable - Set to true to turn on tracing

getTracing

public boolean getTracing()
Determines whether tracing has been enabled for an EventMessage.

Returns:
True if tracing is enabled

Documentation is available at
http://www.weblogic.com/docs51