|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uka.karmi.rmi.server.RemoteObject | +--uka.karmi.rmi.server.UnicastRemoteObject | +--mChaRM.multichannel.channelCore
This class defines how multi-channels behave (by default) in the abstract locus. Any other kind
of multi-channel can be derived from this class. The key issue
consists in overriding the coreMetaBehavior
method.
Fields inherited from class uka.karmi.rmi.server.RemoteObject |
serverRef |
Constructor Summary | |
channelCore(java.lang.String kind,
java.lang.String[] RsName,
java.lang.String SSClassName,
java.lang.String RSClassName)
constructor of multi-channels. |
Method Summary | |
java.lang.Object |
coreMetaBehavior(mChaRMMethodCall msg)
This method embodies the reflective behaviour realized by the multi-channel. |
int |
howManyReceivers()
returns the number of receivers bound to this multi-channel. |
int |
howManySenders()
returns the number of senders bound to this multi-channel, at the moment of the call. |
java.lang.String |
kind()
returns the kind of the multi-channel. |
java.lang.String |
receiverName(int indx)
returns the name of the receiver whose position is specified by indx. |
receiverStubInterface |
receiverStub(java.lang.String name)
|
receiverStubInterface |
receiverStubByPosition(int indx)
|
java.lang.String |
receiverStubClassName()
|
java.lang.Object |
retrieveReceiverFieldValue(java.lang.String receiverName,
java.lang.String fieldName)
retrieves the content of a field of the specified receiver. |
java.lang.Object |
retrieveSenderFieldValue(java.lang.String senderName,
java.lang.String fieldName)
retrieves the content of a field of the specified sender. |
java.lang.String |
senderName(int indx)
returns the name of the sender whose position is specified by indx. |
senderStubInterface |
senderStub(java.lang.String name)
|
senderStubInterface |
senderStubByPosition(int indx)
|
java.lang.String |
senderStubClassName()
|
void |
senderStubHasBeenCreated(java.lang.String senderStubName)
the invocation of this method allows to connect the multi-channel to the new stub. |
void |
setKind(java.lang.String k)
sets the kind of the multi-channel to the passed value k. |
void |
setReceiverName(int indx,
java.lang.String name)
inserts the name of a receiver at the position specified by indx. |
void |
setReceiverStub(java.lang.String name,
receiverStubInterface RSI)
|
void |
setReceiverStubClassName(java.lang.String name)
|
void |
setRsName(java.lang.String[] names)
uses the array of strings specified by name as the set of names of the receivers of the multi-channel. |
void |
setSenderName(int indx,
java.lang.String name)
inserts the name of a sender at the position specified by indx. |
void |
setSenderStub(java.lang.String name,
senderStubInterface SSI)
|
void |
setSenderStubClassName(java.lang.String name)
|
java.lang.String |
supplyASenderStub()
on request, it supplies the class name of its senderStub to the requiring client. |
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 |
|
Constructor Detail |
public channelCore(java.lang.String kind, java.lang.String[] RsName, java.lang.String SSClassName, java.lang.String RSClassName) throws uka.karmi.rmi.RemoteException, ReceiverStubNotFoundException
kind
- a String representing the multi-channel's behavior.RsName
- an Array of Strings representing the name of the receivers, which it is connected to.SSClassName
- a String specifying the class of the stubs that will be attached to the multi-channel senders.RSClassName
- a String specifying the class of the stubs that will be attached to the multi-channel receivers.ReceiverStubNotFoundException
- thrown when one of the specified receiver wasn't started before the core.Method Detail |
public java.lang.String kind()
public final void setKind(java.lang.String k)
k
- the kind of the multi-channel.public final java.lang.String receiverName(int indx)
indx
- the index of the position.public final void setReceiverName(int indx, java.lang.String name)
indx
- the index of the position.name
- the name of the receiver.public final void setRsName(java.lang.String[] names)
names
- a set of names.public final int howManyReceivers()
public final java.lang.String senderName(int indx) throws java.lang.ArrayIndexOutOfBoundsException
indx
- the index of the position.java.lang.ArrayIndexOutOfBoundsException
- thrown when the index passed is too big with respect to the number of the senders.public final void setSenderName(int indx, java.lang.String name) throws java.lang.ArrayIndexOutOfBoundsException
indx
- the index of the position.name
- the name of the receiver.public final int howManySenders()
public final receiverStubInterface receiverStub(java.lang.String name)
public final receiverStubInterface receiverStubByPosition(int indx)
public final void setReceiverStub(java.lang.String name, receiverStubInterface RSI)
public final senderStubInterface senderStub(java.lang.String name)
public final senderStubInterface senderStubByPosition(int indx)
public final void setSenderStub(java.lang.String name, senderStubInterface SSI)
public final java.lang.String receiverStubClassName()
public final void setReceiverStubClassName(java.lang.String name)
public final java.lang.String senderStubClassName()
public final void setSenderStubClassName(java.lang.String name)
public java.lang.Object coreMetaBehavior(mChaRMMethodCall msg) throws MethodDoesNotExistException, uka.karmi.rmi.RemoteException
coreMetaBehavior
in interface channelInterface
msg
- the hijacked method call.MethodDoesNotExistException
- thrown when the method reified doesn't exist in the referent class.public java.lang.Object retrieveSenderFieldValue(java.lang.String senderName, java.lang.String fieldName) throws SenderStubNotFoundException, FieldDoesNotExistException, uka.karmi.rmi.RemoteException
senderName
- the name of the sender the core questions about the content of its fieldfieldName
- the name of the field we want to inspect.SenderStubNotFoundException
- thrown when the sender is unreacheable.FieldDoesNotExistException
- thrown when the class of the sender doesn't define the field passed.public java.lang.Object retrieveReceiverFieldValue(java.lang.String receiverName, java.lang.String fieldName) throws ReceiverStubNotFoundException, FieldDoesNotExistException, uka.karmi.rmi.RemoteException
receiverName
- the name of the receiver the core questions about the content of its fieldfieldName
- the name of the field we want to inspect.ReceiverStubNotFoundException
- thrown when the receiver is unreacheable.FieldDoesNotExistException
- thrown when the class of the sender doesn't define the field passed.public final java.lang.String supplyASenderStub() throws uka.karmi.rmi.RemoteException
supplyASenderStub
in interface channelInterface
public final void senderStubHasBeenCreated(java.lang.String senderStubName) throws SenderStubNotFoundException
senderStubHasBeenCreated
in interface channelInterface
senderStubName
- the name of the stub, who the multi-channel have to connect to.SenderStubNotFoundException
- thrown when the senderStub is not ready to be linked to the core.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |