org.apache.ode.jacob
Interface JacobThread


public interface JacobThread

Class exposing the JACOB operations.

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.


Method Summary
 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)
           
 

Method Detail

getExtension

java.lang.Object getExtension(java.lang.Class extensionClass)

exportChannel

java.lang.String exportChannel(Channel channel)

importChannel

Channel importChannel(java.lang.String channelId,
                      java.lang.Class channelClass)

instance

void instance(JacobRunnable concretion)
Create a process instance i.e. a concretion of a process abstraction.


message

Channel message(Channel channel,
                java.lang.reflect.Method method,
                java.lang.Object[] args)
Send a message (object invocation). This method shouldn't really be used as Channel objects may be used as proxies in this respect.

Parameters:
channel - channel on which to send the message
method - method to apply
args - arguments

newChannel

Channel newChannel(java.lang.Class channelType,
                   java.lang.String creator,
                   java.lang.String description)
Create a new channel.


object

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 }.

Parameters:
replicate - if set the a replication operator is present
methodList - object representation of the method list
Throws:
java.lang.IllegalArgumentException - if the method list does not match the channel kind

object

void object(boolean reaplicate,
            ChannelListener[] methodLists)
            throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException