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 5.1.0sp9 API Reference

## weblogic.event.common
Interface EventRegistrationDef

public interface EventRegistrationDef

Interface for EventRegistrations. Use the methods in this class to register and unregister interest in an event, and to get the ID of an EventRegistration, after manufacturing it by calling getEventRegistration() 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 registering interest in an event:

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

       // Manufacture an EventRegistration object for the client
       EventRegistrationDef er = t3.services.events()
                   .getEventRegistration(
                         "STOCKS",
                         new Evaluate("tutorial.event.stocks.EvaluateStocks", evRegParams),
                         new Action ("tutorial.event.stocks.MailStockInfo",   acRegParams));

       // Do the registration with methods from the object's class
       int regid = er.register();

Author:
  Copyright (c) 1996-1998, 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:
  `T3ServicesDef`, `EventServicesDef`

Field Summary
`static int` | `ON_DISCONNECT` Constant for use with the "count" flag in an EventRegistration.
`static int` | `UNCOUNTED` Constant for use with the "count" flag in an EventRegistration.

Method Summary
`int` | `getID()` Gets the registration ID associated with an EventRegistration.
`int` | `register()` Registers interest in an an event with the event server.
`boolean` | `unregister()` Unregisters an EventRegistration.

Field Detail

### UNCOUNTED

    public static final int UNCOUNTED

  Constant for use with the "count" flag in an EventRegistration. Setting the count flag to UNCOUNTED means that registration will continue to receive opportunities to evaluate events until the registration is unregistered. Setting the count flag to an integer will automatically unregister the registration after it has received that number of events to evaluate.

### ON_DISCONNECT

    public static final int ON_DISCONNECT

  Constant for use with the "count" flag in an EventRegistration. Setting the count flag to ONDISCONNECT means that registration will continue to receive events events until the client that added this registration disconnects.

Method Detail

### register

    public int register()
                 throws EventRegistrationException

  Registers interest in an an event with the event server. The return value is the ID of this registration, which can be used to unregister interest in an event when the reference to the EventRegistration is no longer available.

  Returns:
    Registration ID
  Throws:
    EventRegistrationException - if the registration cannot be completed

### unregister

    public boolean unregister()
                       throws EventRegistrationException

  Unregisters an EventRegistration.

  Returns:
    True if unregistration succeeds
  Throws:
    EventRegistrationException - if the unregistration cannot be completed

### getID

    public int getID()

  Gets the registration ID associated with an EventRegistration. The ID of a registration can be used to unregister interest in an event when the reference to the EventRegistration is no longer available.

  Returns:
    EventRegistration ID

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD