|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jini.jeri.AbstractILFactory jgroup.relacs.gmi.JeriEGMILayer
public class JeriEGMILayer
This layer implements the external group method invocation service based on JERI.
It enables a server to listen for group method invocations from clients external to the object group that the server is a member of and dispatch these invocations to one or more servers within the group.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jgroup.core.ExternalGMIService |
---|
ExternalGMIService.BootstrapInvocationHandler |
Nested classes/interfaces inherited from interface jgroup.core.Layer |
---|
Layer.FinalizeLayer |
Nested classes/interfaces inherited from interface jgroup.core.MembershipListener |
---|
MembershipListener.AllowDuplicateViews |
Nested classes/interfaces inherited from interface net.jini.jeri.InvocationLayerFactory |
---|
net.jini.jeri.InvocationLayerFactory.Instances |
Method Summary | |
---|---|
void |
addListener(java.lang.Object listener)
Add a server/layer that is listening for external group method invocations. |
void |
complete(java.lang.Object server)
This method is called by the GroupManager after the construction
of all the layers, i.e., all addListener calls have been completed,
and the MethodTable is fully populated. |
net.jini.jeri.InvocationDispatcher |
createInvocationDispatcher(java.util.Collection methods,
java.rmi.Remote impl,
net.jini.jeri.ServerCapabilities caps)
|
java.lang.reflect.InvocationHandler |
createInvocationHandler(java.lang.Class[] interfaces,
java.rmi.Remote impl,
net.jini.jeri.ObjectEndpoint oe)
|
ExternalGMIService.BootstrapInvocationHandler |
getBootstrapHandler()
Returns an BootstrapInvocationHandler that can be bound
to a normal Java RMI registry instance and later merged with others. |
protected java.lang.Class[] |
getExtraProxyInterfaces(java.rmi.Remote impl)
By overriding this method we may avoid patching the Mahalo implementation to support our GroupInvocationHandler implementation. |
IID |
getIdentifier()
Returns the invocation identifier for the current external group method invocation. |
static JeriEGMILayer |
getLayer(GroupManager gm,
MulticastService mcast,
MembershipService pgms)
|
ProtocolDispatcher |
getProtocol(MethodSemantics semantics)
Construct a ProtocolDispatcher instance for the given
method invocation semantics. |
java.rmi.Remote |
getProxy(java.rmi.Remote impl)
Returns a proxy exported with the BasicJeriExporter . |
DependableRegistry.RegistryEntry |
getRegistryEntry(java.lang.String serviceName)
Returns the registry entry type required for this implementation of the external GMI service. |
void |
hasLeft()
Upcall that is invoked by Jgroup to acknowledge the fact that this object has left the group. |
void |
prepareChange()
Upcall that is invoked by the group membership service to notify that the current view is not valid any more, and the group membership service is trying to reach an agreement on a new view. |
void |
viewChange(View view)
Notify the invocation dispatcher and the request handler of the most recent server-side view identifier. |
Methods inherited from class net.jini.jeri.AbstractILFactory |
---|
createInstances, equals, getClassLoader, getInvocationDispatcherMethods, getProxyInterfaces, getRemoteInterfaces, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static JeriEGMILayer getLayer(GroupManager gm, MulticastService mcast, MembershipService pgms)
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.public void complete(java.lang.Object server) throws JgroupException
GroupManager
after the construction
of all the layers, i.e., all addListener
calls have been completed,
and the MethodTable
is fully populated.
The purpose of this method is to determine which protocols are actually needed
by the server (and its required layers) and from that construct the protocol
instances and add them to the GroupRequestHandler
object. This
method will also pass the server reference to the protocol instances that need
it.
complete
in interface Layer.FinalizeLayer
server
- The server using a layer implementing the FinalizeLayer
interface.
JgroupException
- if a protocol instance could not be constructed,Layer.FinalizeLayer.complete(java.lang.Object)
public ProtocolDispatcher getProtocol(MethodSemantics semantics) throws JgroupException
ProtocolDispatcher
instance for the given
method invocation semantics.
The protocol instances must follow these rules of design:
ProtocolDispatcher
interface, or do so implicitly through inheritence.
GroupInvocationDispatcher
.
semantics
- the method invocation semantics whose protocol to obtain
JgroupException
- if the protocol could not be constructed, one of the above
rules of design was broken.public java.lang.reflect.InvocationHandler createInvocationHandler(java.lang.Class[] interfaces, java.rmi.Remote impl, net.jini.jeri.ObjectEndpoint oe) throws java.rmi.server.ExportException
createInvocationHandler
in class net.jini.jeri.AbstractILFactory
java.rmi.server.ExportException
public net.jini.jeri.InvocationDispatcher createInvocationDispatcher(java.util.Collection methods, java.rmi.Remote impl, net.jini.jeri.ServerCapabilities caps) throws java.rmi.server.ExportException
createInvocationDispatcher
in class net.jini.jeri.AbstractILFactory
java.rmi.server.ExportException
protected java.lang.Class[] getExtraProxyInterfaces(java.rmi.Remote impl) throws java.rmi.server.ExportException
getExtraProxyInterfaces
in class net.jini.jeri.AbstractILFactory
java.rmi.server.ExportException
@MembershipListener.AllowDuplicateViews public void viewChange(View view)
viewChange
in interface MembershipListener
view
- The new view that has been installed.MembershipListener.viewChange(jgroup.core.View)
public void prepareChange()
MembershipListener
prepareChange
in interface MembershipListener
MembershipService
public void hasLeft()
MembershipListener
leave
method has been invoked on the group membership
service.
hasLeft
in interface MembershipListener
MembershipService
public IID getIdentifier()
ExternalGMIService
getIdentifier
in interface ExternalGMIService
public DependableRegistry.RegistryEntry getRegistryEntry(java.lang.String serviceName) throws JgroupException
ExternalGMIService
getRegistryEntry
in interface ExternalGMIService
JgroupException
public ExternalGMIService.BootstrapInvocationHandler getBootstrapHandler() throws JgroupException
ExternalGMIService
BootstrapInvocationHandler
that can be bound
to a normal Java RMI registry instance and later merged with others.
getBootstrapHandler
in interface ExternalGMIService
JgroupException
public java.rmi.Remote getProxy(java.rmi.Remote impl) throws java.rmi.server.ExportException
ExternalGMIService
BasicJeriExporter
.
getProxy
in interface ExternalGMIService
impl
- the remote object to be exported
java.rmi.server.ExportException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |