Class JChannelCommandDispatcherFactory
java.lang.Object
org.wildfly.clustering.server.jgroups.dispatcher.JChannelCommandDispatcherFactory
- All Implemented Interfaces:
AutoCloseable,Runnable,org.jgroups.blocks.RequestHandler,CommandDispatcherFactory<ChannelGroupMember>,GroupCommandDispatcherFactory<org.jgroups.Address,,ChannelGroupMember> ChannelCommandDispatcherFactory
public class JChannelCommandDispatcherFactory
extends Object
implements ChannelCommandDispatcherFactory, org.jgroups.blocks.RequestHandler, Runnable
MessageDispatcher based CommandDispatcherFactory.
This factory can produce multiple CommandDispatcher instances,
all of which will share the same MessageDispatcher instance.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createCommandDispatcher(Object id, C commandContext, ClassLoader loader) Creates a new command dispatcher using the specified identifier and context whose marshaller will be configured from the specified class loader.getGroup()Returns the group upon which the this command dispatcher operates.handle(org.jgroups.Message request) voidhandle(org.jgroups.Message request, org.jgroups.blocks.Response response) voidrun()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.server.dispatcher.CommandDispatcherFactory
createCommandDispatcher
-
Constructor Details
-
JChannelCommandDispatcherFactory
-
-
Method Details
-
run
public void run() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannelCommandDispatcherFactory
-
handle
- Specified by:
handlein interfaceorg.jgroups.blocks.RequestHandler- Throws:
Exception
-
handle
public void handle(org.jgroups.Message request, org.jgroups.blocks.Response response) throws Exception - Specified by:
handlein interfaceorg.jgroups.blocks.RequestHandler- Throws:
Exception
-
getGroup
Description copied from interface:CommandDispatcherFactoryReturns the group upon which the this command dispatcher operates.- Specified by:
getGroupin interfaceChannelCommandDispatcherFactory- Specified by:
getGroupin interfaceCommandDispatcherFactory<ChannelGroupMember>- Specified by:
getGroupin interfaceGroupCommandDispatcherFactory<org.jgroups.Address,ChannelGroupMember> - Returns:
- a group
-
createCommandDispatcher
public <C> CommandDispatcher<ChannelGroupMember,C> createCommandDispatcher(Object id, C commandContext, ClassLoader loader) Description copied from interface:CommandDispatcherFactoryCreates a new command dispatcher using the specified identifier and context whose marshaller will be configured from the specified class loader. The resultingCommandDispatcherwill communicate with those dispatchers within the group sharing the same identifier.- Specified by:
createCommandDispatcherin interfaceCommandDispatcherFactory<ChannelGroupMember>- Parameters:
id- a unique identifier for this dispatchercommandContext- the context used for executing commandsloader- the class loader used to load commands to be dispatched.- Returns:
- a new command dispatcher
-