Logo Search packages:      
Sourcecode: libjgroups-java version File versions

Channel org::jgroups::JChannelFactory::createMultiplexerChannel ( String  stack_name,
String  id 
) throws Exception [inline]

Creates an implementation of the Channel using a given stack name and registering it under a given identity.

Channel has to be created with a unique application id per stack name.

Provided stack name has to be one of the stacks defined in a property file that was passed to setMultiplexerConfig (e.g conf/stacks.xml). If clients attempt to create a Channel for an undefined stack name or they attempt to register a duplicate Channel per stack an Exception will be thrown.

stack_name The name of the stack to be used. All stacks are defined in the configuration with which the factory is configured (see setMultiplexerConfig(Object) for example.
id The identifier used for multiplexing and demultiplexing (dispatching requests to one of possibly multiple receivers). Note that id needs to be a string since it will be shipped with each message. Try to pick a short string, because this is shipped with every message (overhead).
An implementation of Channel which keeps track of the id, so that it can be attached to each message and be properly dispatched at the receiver.
See also:



Implements org::jgroups::ChannelFactory.

Definition at line 327 of file JChannelFactory.java.

Referenced by org::jgroups::tests::MultiplexerConcurrentTest::testTwoMessagesFromDifferentSendersToDifferentServices(), org::jgroups::tests::MultiplexerConcurrentTest::testTwoMessagesFromDifferentSendersToSameService(), org::jgroups::tests::MultiplexerConcurrentTest::testTwoMessagesFromSameSenderToDifferentServices(), and org::jgroups::tests::MultiplexerConcurrentTest::testTwoMessagesFromSameSenderToSameService().

        return createMultiplexerChannel(stack_name, id, false, null);

Generated by  Doxygen 1.6.0   Back to index