edu.utah.janosvm.sys
Class EventTeamHandle
java.lang.Object
|
+--edu.utah.janosvm.sys.ListNode
|
+--edu.utah.janosvm.sys.Importable
|
+--edu.utah.janosvm.sys.TeamHandle
|
+--edu.utah.janosvm.sys.EventTeamHandle
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- Team
- public class EventTeamHandle
- extends TeamHandle
An extended handle for accessing a team and receiving events from
it.
To get events for a new team, create a new EventTeamHandle
, then
pass it to Team.create
when you create the team. Or, to get events for an existing Team,
pass a TeamHandle
to the EventTeamHandle
constructor.
The same TeamEventHandler
may be registered with more
than one EventTeamHandle
.
- Author:
- Tim Stack, Utah Janos Team
- See Also:
TeamEvent
,
TeamEventHandler
,
Team.create(TeamHandle,String,ResourceSpec[])
Fields inherited from class edu.utah.janosvm.sys.TeamHandle |
be |
Fields inherited from class edu.utah.janosvm.sys.Importable |
em |
Methods inherited from class edu.utah.janosvm.sys.TeamHandle |
bindTo, cancelImport, equals, getDaemonCount, getDescription, getID, getName, getThreadCount, importObject, isTerminated, owns, popReservation, pushReservation, returnFrom, switchTo, terminate, unbindFrom |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
eventMask
private int eventMask
- Mask of events we're interested in.
teh
private TeamEventHandler teh
- The user defined event handler.
EventTeamHandle
public EventTeamHandle(int eventMask,
TeamEventHandler teh,
TeamHandle th)
- Construct an
EventTeamHandle
with the given mask and
handler for the team associated with the given TeamHandle
.
The given TeamHandle
is copied.
- Parameters:
eventMask
- Mask of events we're interested in.teh
- The user defined event handler.th
- Handle on the team to associate with.
EventTeamHandle
public EventTeamHandle(int eventMask,
TeamEventHandler teh)
- Construct an
EventTeamHandle
with the given mask and handler.
The handle will not be attached to any TeamBackEnd
, and can
only be attached implicitly by passing the new handle
to Team.create(edu.utah.janosvm.sys.TeamHandle, java.lang.String, edu.utah.janosvm.resources.ResourceSpec[], kaffe.util.Ptr)
.
- Parameters:
eventMask
- Mask of events we're interested in.teh
- The user defined event handler.
EventTeamHandle
public EventTeamHandle(TeamEventHandler teh)
- Construct an
EventTeamHandle
with the given handler. The
mask is set match to all events, and the handle is
not associated with any TeamBackEnd
.
- Parameters:
teh
- The user defined event handler.
EventTeamHandle
public EventTeamHandle(TeamEventHandler teh,
TeamHandle th)
- Construct an
EventTeamHandle
with the given handler
and attach it to the given team.
- Parameters:
teh
- The user defined event handler.th
- Handle on the TeamBackEnd
to attach this to.
EventTeamHandle
public EventTeamHandle()
- Construct an empty EventTeamHandle.
setEventHandler
public void setEventHandler(TeamEventHandler teh)
- Set the event handler associated with this handle, overwrites
previous handler, if any.
- Parameters:
teh
- The user defined event handler.
getEventHandler
public TeamEventHandler getEventHandler()
- Get the event handler associated with this handle.
- Returns:
- The user defined event handler.
event
final void event(TeamReservation tr,
TeamEvent te)
- Invoke the callback associated with this handler for the
given
TeamEvent
- Parameters:
tr
- A reservation on the team owning this handle.te
- The event.
clone
public java.lang.Object clone()
- Clone this handle, the cloned handle gets a
null
handler.
- Overrides:
clone
in class TeamHandle
toString
public java.lang.String toString()
- Overrides:
toString
in class TeamHandle
This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003