|
|||||||||
Home >> All >> alice >> tuplemedium >> [ runtime overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
alice.tuplemedium.runtime
Class User

java.lang.Objectalice.tuplemedium.runtime.User
- All Implemented Interfaces:
- alice.tuplemedium.VMListener
- public class User
- extends java.lang.Object
- implements alice.tuplemedium.VMListener
- extends java.lang.Object
this is the basic class for developing tuple media TCP/IP user.
if the user is recognized to be local the interactions with the tuple centre virtual machines are realized directly, bypassing TCP/IP protocol (this is possible because of there is only one daemon service installed on a java VM).
if the tuple centre is remote, this class provide the user proxy (or connector) to remote service In this case the class UserListener is the related stub or acceptor, on the remote (daemon) side.
Field Summary | |
private int |
daemonPort
in case of alterenative port |
private alice.tuplemedium.Event |
evReceived
for local access (valid only if user is in the same java VM of daemon |
private alice.tuplemedium.AgentId |
id
user id |
(package private) static int |
MAX_TENTATIVES
|
(package private) static int |
SLEEP_TIME
|
private java.util.HashMap |
tupleCentres
current tuple centres accessed |
Constructor Summary | |
User(alice.tuplemedium.AgentId id_)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
daemonPort
private int daemonPort
- in case of alterenative port
MAX_TENTATIVES
static final int MAX_TENTATIVES
- See Also:
- Constant Field Values
SLEEP_TIME
static final int SLEEP_TIME
- See Also:
- Constant Field Values
id
private alice.tuplemedium.AgentId id
- user id
tupleCentres
private java.util.HashMap tupleCentres
- current tuple centres accessed
evReceived
private alice.tuplemedium.Event evReceived
- for local access (valid only if
user is in the same java VM of daemon
Constructor Detail |
User
public User(alice.tuplemedium.AgentId id_)
Method Detail |
getId
public alice.tuplemedium.AgentId getId()
setDaemonPort
public void setDaemonPort(int port)
out
public void out(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.Tuple t) throws NoDaemonException, alice.tuplemedium.InvalidTupleException, java.io.IOException, java.lang.ClassNotFoundException
in
public alice.tuplemedium.Tuple in(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.TupleTemplate t) throws NoDaemonException, alice.tuplemedium.InvalidTupleTemplateException, java.io.IOException, java.lang.ClassNotFoundException
rd
public alice.tuplemedium.Tuple rd(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.TupleTemplate t) throws NoDaemonException, alice.tuplemedium.InvalidTupleTemplateException, java.io.IOException, java.lang.ClassNotFoundException
inp
public alice.tuplemedium.Tuple inp(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.TupleTemplate t) throws NoDaemonException, alice.tuplemedium.InvalidTupleTemplateException, java.io.IOException, java.lang.ClassNotFoundException
rdp
public alice.tuplemedium.Tuple rdp(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.TupleTemplate t) throws NoDaemonException, alice.tuplemedium.InvalidTupleTemplateException, java.io.IOException, java.lang.ClassNotFoundException
setSpec
public alice.tuplemedium.Tuple setSpec(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.Tuple t) throws NoDaemonException, alice.tuplemedium.InvalidTupleException, java.io.IOException, java.lang.ClassNotFoundException
getSpec
public alice.tuplemedium.Tuple getSpec(alice.tuplemedium.TupleCentreId tid) throws NoDaemonException, java.io.IOException, java.lang.ClassNotFoundException
outAsync
public void outAsync(alice.tuplemedium.TupleCentreId tid, alice.tuplemedium.Tuple t) throws NoDaemonException, alice.tuplemedium.InvalidTupleException, java.io.IOException, java.lang.ClassNotFoundException
shutdown
public void shutdown()
- shutdown user
getTupleCentreInfo
private UserConnectionInfo getTupleCentreInfo(alice.tuplemedium.TupleCentreId tid) throws NoDaemonException, java.io.IOException
- creates or retrieve the connection to a tuple centre vm.
if the tuple centre is new, a new connection to target daemon providing the tuple centre is created, otherwise returns the already established connection
notify
public void notify(alice.tuplemedium.Event ev)
- for local user: notification of a new
event from a tuple centre virtual machine
- Specified by:
notify
in interfacealice.tuplemedium.VMListener
|
|||||||||
Home >> All >> alice >> tuplemedium >> [ runtime overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |