jasco.runtime.distribution
Class DistributePointcutHandler

java.lang.Object
  extended by jasco.runtime.distribution.DistributePointcutHandler
All Implemented Interfaces:
org.jgroups.blocks.RequestHandler

public class DistributePointcutHandler
extends java.lang.Object
implements org.jgroups.blocks.RequestHandler

This singleton class manages the comunication of the Jasco joinpoint(methodsInvocations) events with the group of instances that belongs to the same group.

Author:
lbenavid

Method Summary
 void broadcastMessageAsync(DistributedStandardMessage jm)
          Broad cast a message and do not care bout the answers
 org.jgroups.util.RspList broadcastMessageFirstAnswer(DistributedStandardMessage jm)
          Broad cast a message and waits for the first answer
 org.jgroups.util.RspList broadcastMessageSync(DistributedStandardMessage jm)
          Broad cast a message and waits for all the answers
 org.jgroups.Channel getChannel()
           
static DistributePointcutHandler getInstance()
           
 java.lang.Object getRemoteAsyncResult(Host host, long taskid)
           
 java.lang.Object handle(org.jgroups.Message msg)
           
static void init()
          initializes this manager instance
static boolean initialized()
           
 ObjectFutureWrapper invokeRemoteASynchronous(DistributedAdviceExecution adviceExecution)
           
 java.lang.Object invokeRemoteOn(Host host, DistributedAdviceExecution adviceExecution, int message)
           
 java.lang.Object invokeRemoteSynchronous(DistributedAdviceExecution adviceExecution)
           
 java.lang.Object receiveNotification(JascoMethod jm)
          This methods execute the trap to the remote pointcut.
 void sendNotification(DistributedJascoMethod jm)
           
 java.lang.Object sendSyncMessage(DistributedStandardMessage jm, Host host)
          Send a synchronous Message to an specific host
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChannel

public org.jgroups.Channel getChannel()

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

getInstance

public static DistributePointcutHandler getInstance()

broadcastMessageAsync

public void broadcastMessageAsync(DistributedStandardMessage jm)
Broad cast a message and do not care bout the answers


broadcastMessageSync

public org.jgroups.util.RspList broadcastMessageSync(DistributedStandardMessage jm)
Broad cast a message and waits for all the answers


broadcastMessageFirstAnswer

public org.jgroups.util.RspList broadcastMessageFirstAnswer(DistributedStandardMessage jm)
Broad cast a message and waits for the first answer


sendSyncMessage

public java.lang.Object sendSyncMessage(DistributedStandardMessage jm,
                                        Host host)
Send a synchronous Message to an specific host


sendNotification

public void sendNotification(DistributedJascoMethod jm)

invokeRemoteSynchronous

public java.lang.Object invokeRemoteSynchronous(DistributedAdviceExecution adviceExecution)

getRemoteAsyncResult

public java.lang.Object getRemoteAsyncResult(Host host,
                                             long taskid)

invokeRemoteOn

public java.lang.Object invokeRemoteOn(Host host,
                                       DistributedAdviceExecution adviceExecution,
                                       int message)

receiveNotification

public java.lang.Object receiveNotification(JascoMethod jm)
This methods execute the trap to the remote pointcut. If the trap sends an error a false is answered, if the traps executes ok a true is answered. This can be changed to send objects, but for now there is no need for that.


handle

public java.lang.Object handle(org.jgroups.Message msg)
Specified by:
handle in interface org.jgroups.blocks.RequestHandler

init

public static void init()
initializes this manager instance


initialized

public static boolean initialized()

invokeRemoteASynchronous

public ObjectFutureWrapper invokeRemoteASynchronous(DistributedAdviceExecution adviceExecution)