Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

alice.tuplemedium.runtime
Class UserListener  view UserListener download UserListener.java

java.lang.Object
  extended byalice.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)


Field Summary
(package private)  alice.tuplemedium.TupleCentreVMImpl core
          tuple centre virtual machine reachable from this acceptor
(package private)  java.io.ObjectInputStream inStream
           
(package private)  java.io.ObjectOutputStream outStream
           
(package private)  java.net.Socket socket
          channel with user proxy
(package private)  java.util.HashMap users
          proxy user currently served
 
Constructor Summary
UserListener(java.net.Socket s, java.io.ObjectOutputStream out, java.io.ObjectInputStream in, alice.tuplemedium.TupleCentreVMImpl core_)
           
 
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
 

Field Detail

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

Constructor Detail

UserListener

public UserListener(java.net.Socket s,
                    java.io.ObjectOutputStream out,
                    java.io.ObjectInputStream in,
                    alice.tuplemedium.TupleCentreVMImpl core_)
Method Detail

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