@Deprecated public class JChannelFactory extends Object implements ChannelFactory
Channel
interface.
See JChannel for a discussion of channel properties.JChannelFactory| Constructor and Description |
|---|
JChannelFactory()
Deprecated.
Constructs a
JChannelFactory instance that contains no
protocol stack configuration. |
JChannelFactory(Element properties)
Deprecated.
Constructs a
JChannelFactory instance that utilizes the
specified file for protocl stack configuration. |
JChannelFactory(File properties)
Deprecated.
Constructs a
JChannelFactory instance that utilizes the
specified file for protocl stack configuration. |
JChannelFactory(String properties)
Deprecated.
Constructs a
JChannel instance with the protocol stack
configuration based upon the specified properties parameter. |
JChannelFactory(URL properties)
Deprecated.
Constructs a
JChannelFactory instance that utilizes the
specified file for protocl stack configuration. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearConfigurations()
Deprecated.
Removes all configurations
|
void |
create()
Deprecated.
|
Channel |
createChannel()
Deprecated.
Creates a
JChannel implementation of the
Channel |
Channel |
createChannel(Object properties)
Deprecated.
JChannel's conversion to type-specific
construction, and the subsequent deprecation of its
JChannel(Object) constructor, necessitate the
deprecation of this factory method as well. Type-specific
protocol stack configuration should be specfied during
construction of an instance of this factory. |
Channel |
createChannel(String stack_name)
Deprecated.
|
Channel |
createMultiplexerChannel(String stack_name,
String id)
Deprecated.
Use a shared transport instead of the multiplexer
|
Channel |
createMultiplexerChannel(String stack_name,
String id,
boolean register_for_state_transfer,
String substate_id)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
destroy()
Deprecated.
|
String |
dumpChannels()
Deprecated.
|
String |
dumpConfiguration()
Deprecated.
|
String |
getConfig(String stack_name)
Deprecated.
Returns the stack configuration as a string (to be fed into new JChannel()).
|
String |
getDomain()
Deprecated.
|
String |
getMultiplexerConfig()
Deprecated.
Use a shared transport instead of the multiplexer
|
MBeanServer |
getServer()
Deprecated.
|
boolean |
hasMuxChannel(String stack_name,
String id)
Deprecated.
Use a shared transport instead of the multiplexer
|
boolean |
isExposeChannels()
Deprecated.
|
boolean |
isExposeProtocols()
Deprecated.
|
boolean |
removeConfig(String stack_name)
Deprecated.
|
void |
setDomain(String domain)
Deprecated.
|
void |
setExposeChannels(boolean expose_channels)
Deprecated.
|
void |
setExposeProtocols(boolean expose_protocols)
Deprecated.
|
void |
setMultiplexerConfig(Element properties)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(Element properties,
boolean replace)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(File file)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(File file,
boolean replace)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(Object properties)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(Object properties,
boolean replace)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(String properties)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(String properties,
boolean replace)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(URL url)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setMultiplexerConfig(URL url,
boolean replace)
Deprecated.
Use a shared transport instead of the multiplexer
|
void |
setServer(MBeanServer server)
Deprecated.
|
void |
start()
Deprecated.
|
void |
stop()
Deprecated.
|
public JChannelFactory()
JChannelFactory instance that contains no
protocol stack configuration.public JChannelFactory(File properties) throws ChannelException
JChannelFactory instance that utilizes the
specified file for protocl stack configuration.properties - a file containing a JGroups XML protocol stack
configuration.ChannelException - if problems occur during the interpretation of
the protocol stack configuration.public JChannelFactory(Element properties) throws ChannelException
JChannelFactory instance that utilizes the
specified file for protocl stack configuration.properties - a XML element containing a JGroups XML protocol stack
configuration.ChannelException - if problems occur during the interpretation of
the protocol stack configuration.public JChannelFactory(URL properties) throws ChannelException
JChannelFactory instance that utilizes the
specified file for protocl stack configuration.properties - a URL pointing to a JGroups XML protocol stack
configuration.ChannelException - if problems occur during the interpretation of
the protocol stack configuration.public JChannelFactory(String properties) throws ChannelException
JChannel instance with the protocol stack
configuration based upon the specified properties parameter.properties - an old style property string, a string representing a
system resource containing a JGroups XML configuration,
a string representing a URL pointing to a JGroups XML
XML configuration, or a string representing a file name
that contains a JGroups XML configuration.ChannelException - if problems occur during the interpretation of
the protocol stack configuration.public void setMultiplexerConfig(Object properties) throws Exception
ChannelFactorysetMultiplexerConfig in interface ChannelFactoryproperties - ExceptionChannelExceptionpublic void setMultiplexerConfig(Object properties, boolean replace) throws Exception
properties - replace - Exceptionpublic void setMultiplexerConfig(File file) throws Exception
ChannelFactorysetMultiplexerConfig in interface ChannelFactoryfile - ExceptionChannelExceptionpublic void setMultiplexerConfig(File file, boolean replace) throws Exception
file - replace - Exceptionpublic void setMultiplexerConfig(Element properties) throws Exception
setMultiplexerConfig in interface ChannelFactoryproperties - Exceptionpublic void setMultiplexerConfig(Element properties, boolean replace) throws Exception
properties - replace - Exceptionpublic void setMultiplexerConfig(URL url) throws Exception
setMultiplexerConfig in interface ChannelFactoryurl - Exceptionpublic void setMultiplexerConfig(URL url, boolean replace) throws Exception
url - replace - Exceptionpublic void setMultiplexerConfig(String properties) throws Exception
setMultiplexerConfig in interface ChannelFactoryproperties - Exceptionpublic void setMultiplexerConfig(String properties, boolean replace) throws Exception
properties - replace - Exceptionpublic String getConfig(String stack_name) throws Exception
Exceptionpublic String getMultiplexerConfig()
public void clearConfigurations()
public boolean removeConfig(String stack_name)
public MBeanServer getServer()
public void setServer(MBeanServer server)
public String getDomain()
public void setDomain(String domain)
public boolean isExposeChannels()
public void setExposeChannels(boolean expose_channels)
public boolean isExposeProtocols()
public void setExposeProtocols(boolean expose_protocols)
public Channel createChannel(Object properties) throws ChannelException
JChannel's conversion to type-specific
construction, and the subsequent deprecation of its
JChannel(Object) constructor, necessitate the
deprecation of this factory method as well. Type-specific
protocol stack configuration should be specfied during
construction of an instance of this factory.JChannel implementation of the
Channel interface.createChannel in interface ChannelFactoryproperties - the protocol stack configuration information; a
null value means use the default protocol
stack configuration.ChannelException - if the creation of the channel failed.public Channel createChannel() throws ChannelException
JChannel implementation of the
Channel interface using the protocol stack configuration
information specfied during construction of an instance of this factory.createChannel in interface ChannelFactoryChannelException - if the creation of the channel failed.public Channel createChannel(String stack_name) throws Exception
createChannel in interface ChannelFactoryExceptionpublic Channel createMultiplexerChannel(String stack_name, String id) throws Exception
ChannelFactoryChannel 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.
createMultiplexerChannel in interface ChannelFactorystack_name - id - ExceptionChannelExceptionMultiplexer,
MuxChannelpublic Channel createMultiplexerChannel(String stack_name, String id, boolean register_for_state_transfer, String substate_id) throws Exception
ChannelFactoryChannel 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.
Rather than having each multiplexed channel do a separate state transfer clients can bundle state transfers for all channels created with the same ChannelFactory. First of all, clients have to create Channels with register_for_state_transfer set to true. After the last Channel that was created with register_for_state_transfer set to true connects and initiates state transfer the actual state transfer for all such channels from this ChannelFactory is executed.
Using bundled state transfers is especially useful with the FLUSH protocol in a stack. Recall that each state transfer triggers a flush and thus instead of doing a separate flush for each Channel created with this ChannelFactory we execute only one flush for all state transfers.
However, be aware of the implication of asynchronous nature of bundled state transfer with the respect of channel connect. Recall that each Channel after it returns from successful getState method can assume that state is available. In case of bundled state transfer, state will be set only after the last Channel registered for the bundled state transfer connects and executes getState.
createMultiplexerChannel in interface ChannelFactorystack_name - id - register_for_state_transfer - substate_id - ExceptionChannelExceptionMultiplexer,
MuxChannelpublic boolean hasMuxChannel(String stack_name, String id)
stack_name - name of the stack usedid - service idpublic void stop()
public void destroy()
public String dumpConfiguration()
public String dumpChannels()
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.