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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConfiguration for aJChannelCommandDispatcherFactory. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a channel-based command dispatcher factory using the specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<C> CommandDispatcher<ChannelGroupMember, C> 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommandDispatcherFactory
createCommandDispatcher
-
Constructor Details
-
JChannelCommandDispatcherFactory
Creates a channel-based command dispatcher factory using the specified configuration.- Parameters:
config- the configuration of the command dispatcher factory.
-
-
Method Details
-
run
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannelCommandDispatcherFactory
-
handle
-
handle
-
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:
- the group associated with this command dispatcher factory.
-
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>- Type Parameters:
C- the command context type- 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
-