public interface JacobThread
Note: these operations represent a subset of a process algebra mapped into Java invocations; other aspects of the syntax are represented natively in Java. In particular, parallel composition is modelled as sequential Java invocation and if-else are modelled using Java's if-else statement. Note also that the scoping rules for channel names are simply the Java object visibility rules.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
exportChannel(Channel channel) |
java.lang.Object |
getExtension(java.lang.Class extensionClass) |
Channel |
importChannel(java.lang.String channelId,
java.lang.Class channelClass) |
void |
instance(JacobRunnable concretion)
Create a process instance i.e.
|
Channel |
message(Channel channel,
java.lang.reflect.Method method,
java.lang.Object[] args)
Send a message (object invocation).
|
Channel |
newChannel(java.lang.Class channelType,
java.lang.String creator,
java.lang.String description)
Create a new channel.
|
void |
object(boolean replicate,
ChannelListener methodList)
Receive a message on a channel, allowing for possible replication.
|
void |
object(boolean reaplicate,
ChannelListener[] methodLists) |
java.lang.Object getExtension(java.lang.Class extensionClass)
java.lang.String exportChannel(Channel channel)
Channel importChannel(java.lang.String channelId, java.lang.Class channelClass)
void instance(JacobRunnable concretion)
Channel message(Channel channel, java.lang.reflect.Method method, java.lang.Object[] args)
Channel
objects may be used as proxies in this respect.channel
- channel on which to send the messagemethod
- method to applyargs
- argumentsChannel newChannel(java.lang.Class channelType, java.lang.String creator, java.lang.String description)
void object(boolean replicate, ChannelListener methodList) throws java.lang.IllegalArgumentException
Receive a message on a channel, allowing for possible replication. The
effect of this method is to register a listener (the method list) for a
message on the channel to consume either one or an infinate number of
messages on the channel (depending on the value of the
replicate
argument.
With respect to process terms, the Java expression object(false, x,
ChannelListener)
corresponds to the process term x ? { ChannelListener }
;
if in the same expression the initial replicate
parameter
were instead set to true
, corresponding term would be
! x ? { ChannelListener }
.
replicate
- if set the a replication operator is presentmethodList
- object representation of the method listjava.lang.IllegalArgumentException
- if the method list does not match the channel kindvoid object(boolean reaplicate, ChannelListener[] methodLists) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException