Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.debugger
Class EventManager

    java.lang.Object
      com.sun.squawk.debugger.EventManager

All Implemented Interfaces:
  EventNotifier.Consumer, Runnable

    public abstract class EventManager

extends Object
implements Runnable, EventNotifier.Consumer

The `EventManager` class manages requests from a remote entity that wants to be notified when certain events occur. The event manager registers the requests and co-ordinates notifications when an event occurs for which there may be a matching request.

Nested Class Summary
`static class` | `EventManager.MatchedRequests` Summary of the requests that matched given event.

Field Summary
`protected EventNotifier` | `notifier` The object that is the conduit for events sent from an event producer.
`protected Vector` | `requests` The set of registered event requests.

Constructor Summary
`protected` | `EventManager(EventRequestModifier.Matcher matcher)`

Method Summary
`boolean` | `clear(int eventKind, int requestID)` Removes some event request(s) from this manager.
`void` | `consumeEvent(Debugger.Event event)` Consumes an event from an event producer.
`Enumeration` | `getEventsOfKind(int eventKind)` Returns an enumeration of all the event requests of a given kind.
`boolean` | `isDone()` Determines if this consumer is still interested in consuming events.
`abstract boolean` | `isMyEventRequestID(int id)` Events handled by proxy are odd, and those by the agent are even.
`void` | `logRegisteredRequests()`
`EventManager.MatchedRequests` | `matchRequests(Debugger.Event event)` Finds the registered requests that match a given event.
`void` | `produceEvent(Debugger.Event event)`
`boolean` | `quit()`
`void` | `register(EventRequest request)` Registers an event request with this manager.
`void` | `run()` Main event handling loop of the event manager.
`abstract void` | `send(Debugger.Event event, EventManager.MatchedRequests mr)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### notifier

    protected final EventNotifier notifier

  The object that is the conduit for events sent from an event producer.

### requests

    protected Vector requests

  The set of registered event requests.

Constructor Detail

### EventManager

    protected EventManager(EventRequestModifier.Matcher matcher)

Method Detail

### run

    public void run()

  Main event handling loop of the event manager.

  Specified by:
    `run` in interface `Runnable`
  See Also:
    `Thread.run()`

### quit

    public boolean quit()

### register

    public void register(EventRequest request)

  Registers an event request with this manager.

  Parameters:
    `request` - the event request to add

### clear

    public boolean clear(int eventKind,
                         int requestID)

  Removes some event request(s) from this manager.

  Parameters:
    `eventKind` - the `JDWP.EventKind` of the request(s) to remove or 0 to remove all requests
    `requestID` - the ID of the request to remove or 0 to remove all requests of `eventKind`
  Returns:
    true if at least one request was removed, false otherwise

### getEventsOfKind

    public Enumeration getEventsOfKind(int eventKind)

  Returns an enumeration of all the event requests of a given kind.

  Parameters:
    `eventKind` - the `JDWP.EventKind` of events to retrieve
  Returns:
    an enumeration of all registered events whose kind matches `eventKind`

### produceEvent

    public final void produceEvent(Debugger.Event event)

  Parameters:
    `event` -
  See Also:
    `EventNotifier.produceEvent(com.sun.squawk.Debugger.Event, com.sun.squawk.debugger.EventNotifier.Consumer)`

### isDone

    public final boolean isDone()

  Determines if this consumer is still interested in consuming events.

  Specified by:
    `isDone` in interface `EventNotifier.Consumer`
  Returns:
    trus if this consumer in no longer consuming events

### matchRequests

    public EventManager.MatchedRequests matchRequests(Debugger.Event event)

  Finds the registered requests that match a given event.

  Parameters:
    `event` - to match against requests
  Returns:
    set of matching event requsts, or null

### consumeEvent

    public void consumeEvent(Debugger.Event event)
                      throws IOException

  Consumes an event from an event producer.

  Specified by:
    `consumeEvent` in interface `EventNotifier.Consumer`
  Parameters:
    `event` - the details of the event
  Throws:
    `IOException` - if an IO error occurs

### logRegisteredRequests

    public void logRegisteredRequests()

### send

    public abstract void send(Debugger.Event event,
                              EventManager.MatchedRequests mr)
                       throws IOException,
                              SDWPException

  Throws:
    `IOException`
    `SDWPException`

### isMyEventRequestID

    public abstract boolean isMyEventRequestID(int id)

  Events handled by proxy are odd, and those by the agent are even.

  Parameters:
    `id` - the id to check
  Returns:
    true if the event request was handled locally

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"