- All Implemented Interfaces:
- java.lang.Cloneable, receiverStubInterface, uka.karmi.rmi.Remote, RMPReceiverStubInterface, stubInterface
- public class RMPReceiverStub
- extends receiverStub
- implements RMPReceiverStubInterface
Instances of this class are used as stubs of the multi-channel on the receiver site.
Each receiver connected to a multi-channel will be extended by a stub of such a multi-channel.
This class defines the meta-computations that have to be performed on the receiver side.
- Version 1.2
- Michele Ferraro (email@example.com)
Luigi Tosetto (firstname.lastname@example.org)
Davide Zerbino (email@example.com)
|Fields inherited from class uka.karmi.rmi.server.RemoteObject
|Methods inherited from class uka.karmi.rmi.server.UnicastRemoteObject
buildStub, clone, exportObject, exportObject, unexportObject
|Methods inherited from class uka.karmi.rmi.server.RemoteObject
equals, hashCode, toString, toStub
|Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, wait, wait, wait
public RMPReceiverStub(java.lang.Object myReferent,
- RMPReceiverStub constructor.
It calls the constructor of the superclass, stores the name of the receiver, the server and its core,
initializes data structures for Acks.
myReferent - a representant of the stub referent.
myKind - the multi-channel's name.
myReferentName - the referent's name.
ReceiverStubCannotBeRegisteredAsAServerException - thrown when the stub cannot be registered as a server.
CoreNotFoundException - thrown when the core of the multi-channel, which the stub is part of,
doesn't exist or isn't correctly registered as a server.
uka.karmi.rmi.NotBoundException - thrown when there is a trouble allocating the space to store acknowledges.
public java.lang.String pACK(int n)
- It adds an Ack for the message n. If the receiver hasn't yet this message it sends to the channel a NAck
When a message arrives to a receiver, pACK is called on each other receiver to notify this event.
- Specified by:
pACK in interface
n - the number of the message arrived.
- the string "OK" if it's all right.
public void beforeReceiverSideMetaBehavior(mChaRMMethodCall msg)
- It is called before invoking the method and permits to perform the last meta-computation on the receiver
If the message arrives for the first time it stores it and sends Acks to the others receivers,
then waits until all previous messages and Acks are arrived. Otherwise nothing is done.
beforeReceiverSideMetaBehavior in class
msg - the message arrived.