|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.rmi.IntGroupHandler
public class IntGroupHandler
Handler for group internal invocations. It is used to dynamically
generate a proxy for internal GMI.
Note that the InternalGMIService
interface is not
implemented by the IntGroupHandler
layer, but rather by
the dynamically generated proxy object. The interface is included
here, only to follow the rules of the layer configuration structure
which does not deal with proxy based layers as is. That is a layer
must implement its service interface
(InternalGMIService
in this case), and since the
dynamically generated proxy is the object actually implementing the
service interface, we must do this trick. The method from the
InternalGMIService
interface simply throws an
UnsupportedOperationException
and thus should never be
called.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jgroup.core.Layer |
---|
Layer.FinalizeLayer |
Method Summary | |
---|---|
void |
addListener(java.lang.Object listener)
Add a server/layer that is listening for internal group method invocations. |
java.lang.Object |
deliverObject(java.lang.Object obj,
MemberId sender,
int seqNo)
Upcall that is invoked by Jgroup to deliver a message obj
related to the group identified by group . |
java.lang.Object |
deliverStream(java.io.InputStream inmsg,
MemberId sender,
int seqNo)
Upcall that is invoked by Jgroup to deliver a message msg related to the IGMI protocol. |
static IntGroupHandler |
getLayer(MulticastService mcastService)
|
java.lang.String |
getProtocolName()
Returns a string naming the protocol implemented by this multicast listener. |
java.lang.Object |
invoke(java.lang.reflect.Method m,
java.lang.Object[] args,
Callback callback)
Dummy method. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method m,
java.lang.Object[] args)
Processes a method invocation on a proxy instance and returns the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IntGroupHandler getLayer(MulticastService mcastService)
public void addListener(java.lang.Object listener)
addListener
in interface Layer
listener
- An Object
representation of the listener interface.
This will typically be cast to the appropriate listener interface
type after checking the type with the instanceof operator.
java.lang.IllegalStateException
- Thrown if this method has already been invoked with another
listener for group method invocations. It is not allowed to
have multiple local listeners for group method invocations.
java.lang.IllegalArgumentException
- Raised if the specified listener is not an InternalGMIListener.public java.lang.Object invoke(java.lang.reflect.Method m, java.lang.Object[] args, Callback callback) throws java.lang.Exception
invoke
in interface InternalGMIService
java.lang.Exception
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public java.lang.String getProtocolName()
getProtocolName
in interface MulticastListener
public java.lang.Object deliverStream(java.io.InputStream inmsg, MemberId sender, int seqNo)
msg
related to the IGMI protocol.
deliverStream
in interface MulticastListener
inmsg
- the stream from which the message may be read.sender
- the sender of the multicast messageseqNo
- the sequence number of this multicast message
public java.lang.Object deliverObject(java.lang.Object obj, MemberId sender, int seqNo)
obj
related to the group identified by group
. In this case,
the message is an object marshalled and unmarshalled through java
serialization.
deliverObject
in interface MulticastListener
obj
- the object containing the message.sender
- the sender of the multicast messageseqNo
- the sequence number of this multicast message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |