EchoPoint
1.0

echopoint.asynch
Interface AsynchEventSink

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AsynchContentPane, AsynchEventQueue

public interface AsynchEventSink
extends java.io.Serializable

AsychEventSink is a place for AsynchEvents to be placed. These events can later be retrived by event processing code.


Method Summary
 AsynchEvent getEvent()
          Returns the next event in the sink, waiting forever till one is available.
 AsynchEvent getEvent(long waitTime)
          Returns the next event in the sink, waiting for waitTime.
 boolean putEvent(AsynchEvent asynchEvent)
          Puts an event into the sink, waiting forever until there is room to place the event..
 boolean putEvent(AsynchEvent asynchEvent, int waitTime)
          Puts an event into the sink, waiting up to waitTime until there is room to place the event.
 

Method Detail

putEvent

public boolean putEvent(AsynchEvent asynchEvent)
                 throws java.lang.InterruptedException
Puts an event into the sink, waiting forever until there is room to place the event..

Parameters:
asynchEvent - - the event to place in the sink
Returns:
true if the event could be placed in the sink
Throws:
java.lang.InterruptedException

putEvent

public boolean putEvent(AsynchEvent asynchEvent,
                        int waitTime)
                 throws java.lang.InterruptedException
Puts an event into the sink, waiting up to waitTime until there is room to place the event.

Parameters:
asynchEvent - - the event to place in the sink
waitTime - - how long to wait for room in the sink or - 1 to wait for ever
Returns:
true if the event could be placed in the sink or false if there is no room after the specified waitTime.
Throws:
java.lang.InterruptedException

getEvent

public AsynchEvent getEvent()
                     throws java.lang.InterruptedException
Returns the next event in the sink, waiting forever till one is available.

Returns:
an AsynchEvent
Throws:
java.lang.InterruptedException

getEvent

public AsynchEvent getEvent(long waitTime)
                     throws java.lang.InterruptedException
Returns the next event in the sink, waiting for waitTime.

Parameters:
waitTime - - how long to wait for an event
Returns:
an AsynchEvent or null if there is no available in the time frame
Throws:
java.lang.InterruptedException

EchoPoint
1.0