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

java.lang.Objectalice.tucson.User
- All Implemented Interfaces:
- TucsonInterface
- Direct Known Subclasses:
- Agent
- public class User
- extends java.lang.Object
- implements TucsonInterface
- extends java.lang.Object
Defines the basic TuCSoN user, capable of accessing the TuCSoN infrastructure It uses a generic tuplemedium TCP/IP user, providing a suitable interface tuned on TuCSoN specificity
- Version:
- 1.0
Field Summary | |
protected static TupleCentreId |
defaultTid
|
protected alice.tuplemedium.runtime.User |
user
|
Constructor Summary | |
User(AgentId id)
Constructs the user specifying its identifier |
|
User(java.lang.String name)
Constructs the user specifying its name |
Method Summary | |
AgentId |
getId()
Gets the identifier of the user |
alice.logictuple.LogicTuple |
getSpec()
Gets the behaviour specification of the default tuple centre |
alice.logictuple.LogicTuple |
getSpec(TupleCentreId tid)
Gets the behaviour specification of a specified tuple centre |
alice.logictuple.LogicTuple |
in(alice.logictuple.LogicTuple t)
Gets (blocking) a matching logic tuples from the default tuple centre |
alice.logictuple.LogicTuple |
in(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Gets (blocking) a matching logic tuples from the specified tuple centre |
alice.logictuple.LogicTuple |
inp(alice.logictuple.LogicTuple t)
Gets if present (without blocking) a matching logic tuples from the default tuple centre |
alice.logictuple.LogicTuple |
inp(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Gets if present (without blocking) a matching logic tuples from the specified tuple centre |
void |
out(alice.logictuple.LogicTuple t)
Places (synchronously) a tuples on the default tuple centre |
void |
out(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Places (synchronously) a tuples on the specified tuple centre |
void |
outAsync(alice.logictuple.LogicTuple t)
Places (asynchronously) a tuples on the default tuple centre |
void |
outAsync(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Places (asynchronously) a tuples on the specified tuple centre |
alice.logictuple.LogicTuple |
rd(alice.logictuple.LogicTuple t)
Reads (blocking) a matching logic tuples from the default tuple centre |
alice.logictuple.LogicTuple |
rd(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Reads (blocking) a matching logic tuples from the specified tuple centre |
alice.logictuple.LogicTuple |
rdp(alice.logictuple.LogicTuple t)
Reads if present (without blocking) a matching logic tuples from the default tuple centre |
alice.logictuple.LogicTuple |
rdp(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Reads if present (without blocking) a matching logic tuples from the specified tuple centre |
void |
setDaemonPort(int port)
Specifies the port of the TuCSoN infrastructure If none specified, the default one is used. |
alice.logictuple.LogicTuple |
setSpec(alice.logictuple.LogicTuple t)
Reads if present (without blocking) a matching logic tuples from the default tuple centre |
alice.logictuple.LogicTuple |
setSpec(TupleCentreId tid,
alice.logictuple.LogicTuple t)
Sets the behaviour specification of a specified tuple centre |
void |
shutdown()
Shutdowns the user |
private alice.logictuple.LogicTuple |
unify(alice.tuplemedium.TupleTemplate template,
alice.tuplemedium.Tuple tuple)
Helper service, which unifies a tuple template and a tuple |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
user
protected alice.tuplemedium.runtime.User user
defaultTid
protected static final TupleCentreId defaultTid
Constructor Detail |
User
public User(AgentId id)
- Constructs the user specifying its identifier
User
public User(java.lang.String name)
- Constructs the user specifying its name
Method Detail |
getId
public AgentId getId()
- Gets the identifier of the user
setDaemonPort
public void setDaemonPort(int port)
- Specifies the port of the TuCSoN infrastructure
If none specified, the default one is used.
out
public void out(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Places (synchronously) a tuples on the specified tuple centre
- Specified by:
out
in interfaceTucsonInterface
outAsync
public void outAsync(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Places (asynchronously) a tuples on the specified tuple centre
- Specified by:
outAsync
in interfaceTucsonInterface
in
public alice.logictuple.LogicTuple in(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Gets (blocking) a matching logic tuples from the specified tuple centre
- Specified by:
in
in interfaceTucsonInterface
rd
public alice.logictuple.LogicTuple rd(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Reads (blocking) a matching logic tuples from the specified tuple centre
- Specified by:
rd
in interfaceTucsonInterface
inp
public alice.logictuple.LogicTuple inp(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Gets if present (without blocking) a matching logic tuples from the specified tuple centre
- Specified by:
inp
in interfaceTucsonInterface
rdp
public alice.logictuple.LogicTuple rdp(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Reads if present (without blocking) a matching logic tuples from the specified tuple centre
- Specified by:
rdp
in interfaceTucsonInterface
setSpec
public alice.logictuple.LogicTuple setSpec(TupleCentreId tid, alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Sets the behaviour specification of a specified tuple centre
- Specified by:
setSpec
in interfaceTucsonInterface
getSpec
public alice.logictuple.LogicTuple getSpec(TupleCentreId tid) throws NoTucsonNodeException, TucsonIOException
- Gets the behaviour specification of a specified tuple centre
- Specified by:
getSpec
in interfaceTucsonInterface
out
public void out(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Places (synchronously) a tuples on the default tuple centre
- Specified by:
out
in interfaceTucsonInterface
outAsync
public void outAsync(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Places (asynchronously) a tuples on the default tuple centre
- Specified by:
outAsync
in interfaceTucsonInterface
in
public alice.logictuple.LogicTuple in(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Gets (blocking) a matching logic tuples from the default tuple centre
- Specified by:
in
in interfaceTucsonInterface
rd
public alice.logictuple.LogicTuple rd(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Reads (blocking) a matching logic tuples from the default tuple centre
- Specified by:
rd
in interfaceTucsonInterface
inp
public alice.logictuple.LogicTuple inp(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Gets if present (without blocking) a matching logic tuples from the default tuple centre
- Specified by:
inp
in interfaceTucsonInterface
rdp
public alice.logictuple.LogicTuple rdp(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Reads if present (without blocking) a matching logic tuples from the default tuple centre
- Specified by:
rdp
in interfaceTucsonInterface
setSpec
public alice.logictuple.LogicTuple setSpec(alice.logictuple.LogicTuple t) throws NoTucsonNodeException, TucsonIOException, alice.logictuple.InvalidLogicTupleException
- Reads if present (without blocking) a matching logic tuples from the default tuple centre
- Specified by:
setSpec
in interfaceTucsonInterface
getSpec
public alice.logictuple.LogicTuple getSpec() throws NoTucsonNodeException, TucsonIOException
- Gets the behaviour specification of the default tuple centre
- Specified by:
getSpec
in interfaceTucsonInterface
shutdown
public void shutdown()
- Shutdowns the user
unify
private alice.logictuple.LogicTuple unify(alice.tuplemedium.TupleTemplate template, alice.tuplemedium.Tuple tuple)
- Helper service, which unifies a tuple template and a tuple
|
|||||||||
Home >> All >> alice >> [ tucson overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |