java.lang.Object
alice.tuplemedium.runtime.UserListener
- All Implemented Interfaces:
- java.lang.Runnable, alice.tuplemedium.VMListener
- public class UserListener
- extends java.lang.Object
- implements alice.tuplemedium.VMListener, java.lang.Runnable
this is user active acceptor class receiving communication
events from user proxy and dispatching them to the
referenced tuple centre virtual machine.
The interaction is bidirectional: output events from
tuple centre vm are dispatched to user proxy
an acceptor could serve more then one user proxy
(because of it hasn't blocking operations)
Method Summary |
void |
notify(alice.tuplemedium.Event ev)
dispatching a virtual machine event
from the tuple centre to the user |
void |
run()
behaviour of the acceptor:
wait for communication events from a user proxy and
dispatch them to the virtual machine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
java.net.Socket socket
- channel with user proxy
outStream
java.io.ObjectOutputStream outStream
inStream
java.io.ObjectInputStream inStream
core
alice.tuplemedium.TupleCentreVMImpl core
- tuple centre virtual machine reachable from this acceptor
users
java.util.HashMap users
- proxy user currently served
UserListener
public UserListener(java.net.Socket s,
java.io.ObjectOutputStream out,
java.io.ObjectInputStream in,
alice.tuplemedium.TupleCentreVMImpl core_)
run
public void run()
- behaviour of the acceptor:
wait for communication events from a user proxy and
dispatch them to the virtual machine
- Specified by:
run
in interface java.lang.Runnable
notify
public void notify(alice.tuplemedium.Event ev)
- dispatching a virtual machine event
from the tuple centre to the user
- Specified by:
notify
in interface alice.tuplemedium.VMListener