mChaRM.multichannel
Class stub

java.lang.Object
  |
  +--uka.karmi.rmi.server.RemoteObject
        |
        +--uka.karmi.rmi.server.UnicastRemoteObject
              |
              +--mChaRM.multichannel.stub
All Implemented Interfaces:
java.lang.Cloneable, uka.karmi.rmi.Remote, stubInterface
Direct Known Subclasses:
receiverStub, senderStub

class stub
extends uka.karmi.rmi.server.UnicastRemoteObject
implements stubInterface

This class represents the common root for both sender and receiver stub classes. Both sender and receiver stubs have common features and behaviors. Both of them have to be connected to the core of the multi-channel, and offer it some services. Besides both of them allow the multi-channel to access the state of its referents.

Since:
Version 1.0
Version:
1.2
Author:
Walter Cazzola (cazzola@disi.unige.it)

Fields inherited from class uka.karmi.rmi.server.RemoteObject
serverRef
 
Constructor Summary
stub()
           
 
Method Summary
 java.lang.Object referent()
          accessor to the referent of the stub.
 java.lang.Object retrieveField(java.lang.String fieldName)
          queries for the contents of a specified field of the referent.
 void setReferent(java.lang.Object r)
          sets the referent of this stub.
 void setWhoIsMyCore(java.lang.String kind)
          links the stub to the core of the multi-channel which it is part of.
 channelInterface WhoIsMyCore()
          It supplies a pointer to the core of the multi-channel.
 
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
 

Constructor Detail

stub

public stub()
     throws uka.karmi.rmi.RemoteException
Method Detail

WhoIsMyCore

public final channelInterface WhoIsMyCore()
It supplies a pointer to the core of the multi-channel.
Returns:
an instance of the interface of the multi-channel.

setWhoIsMyCore

public final void setWhoIsMyCore(java.lang.String kind)
                          throws CoreNotFoundException
links the stub to the core of the multi-channel which it is part of.
Parameters:
kind - the kind of the core of the multi-channel which it is part of.
Throws:
CoreNotFoundException - thrown when the core doesn't exist or isn't registered as a server.

setReferent

public final void setReferent(java.lang.Object r)
sets the referent of this stub.
Parameters:
referent - the referent.

referent

public final java.lang.Object referent()
accessor to the referent of the stub.
Returns:
a pointer to the referent of this stub.

retrieveField

public java.lang.Object retrieveField(java.lang.String fieldName)
                               throws FieldDoesNotExistException
queries for the contents of a specified field of the referent.
Specified by:
retrieveField in interface stubInterface
Parameters:
fieldName - the name of the field whose content is retrieved.
Returns:
an object representing the contents of the specified field.
Throws:
FieldDoesNotExistException - thrown when the specified field isn't declared in the class of the referent.