|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JChannelFactoryMBean
StandardMBean interface for JChannelFactory
. Based on the
org.jgroups.jmx.JChannelFactoryMBean
interface, which
is scheduled to be removed.
The plain-old-java-interface for the channel factory is
org.jgroups.ChannelFactory
; users are encouraged to dependency
inject a org.jgroups.ChannelFactory
.
Method Summary | |
---|---|
void |
clearConfigurations()
Removes all protocol stack configurations |
void |
create()
Execute the create phase of the 4 step lifecycle. |
org.jgroups.Channel |
createChannel(String stack_name)
Create a Channel using the specified stack. |
org.jgroups.Channel |
createMultiplexerChannel(String stack_name,
String id)
Creates and returns a shared transport Channel configured with the specified protocol stack configuration . |
org.jgroups.Channel |
createMultiplexerChannel(String stack_name,
String id,
boolean register_for_state_transfer,
String substate_id)
Creates and returns a shared transport Channel configured with the specified protocol stack configuration . |
void |
destroy()
Execute the destroy phase of the 4 step lifecycle. |
String |
dumpChannels()
Dumps the names of any currently running multiplexer channels along with the id's of any services that are using them. |
String |
dumpConfiguration()
Returns the names of the currently registered protocol stack configurations. |
String |
getConfig(String stack_name)
Returns the stack configuration as a string (valid to be fed into new JChannel()). |
String |
getDomain()
Gets the domain portion of any ObjectName the factory should
use when registering channels or protocols in JMX. |
String |
getMultiplexerConfig()
Returns all configurations as a string |
boolean |
isExposeChannels()
Gets whether this factory should register channels it creates in JMX. |
boolean |
isExposeProtocols()
Gets whether this factory should register protocols it creates in JMX. |
boolean |
removeConfig(String stack_name)
Removes the given stack from the configuration. |
void |
setDomain(String name)
Sets the domain portion of any ObjectName the factory should
use when registering channels or protocols in JMX. |
void |
setExposeChannels(boolean flag)
Sets whether this factory should register channels it creates in JMX. |
void |
setExposeProtocols(boolean f)
Sets whether this factory should register protocols it creates in JMX. |
void |
setMultiplexerConfig(String properties)
Instructs JGroups to load a set of XML protocol stack configurations. |
void |
setMultiplexerConfig(String properties,
boolean replace)
Instructs JGroups to load a set of XML protocol stack configurations. |
void |
start()
Execute the start phase of the 4 step lifecycle. |
void |
stop()
Execute the stop phase of the 4 step lifecycle. |
Method Detail |
---|
String getMultiplexerConfig()
void setMultiplexerConfig(String properties) throws Exception
setMultiplexerConfig(properties, true)
.
properties
- a string representing a system resource containing a
JGroups XML configuration, a string representing a URL
pointing to a JGroups XML configuration, or a string
representing a file name that contains a JGroups XML
configuration.
Exception
void setMultiplexerConfig(String properties, boolean replace) throws Exception
properties
- a string representing a system resource containing a
JGroups XML configuration, a string representing a URL
pointing to a JGroups XML configuration, or a string
representing a file name that contains a JGroups XML
configuration.replace
- true
if any protocol stack configuration
in properties
that has the same name
as an existing configuration should replace that
existing configuration; false
if the
existing configuration should take precedence.
Exception
String getDomain()
ObjectName
the factory should
use when registering channels or protocols in JMX.
null
.void setDomain(String name)
ObjectName
the factory should
use when registering channels or protocols in JMX.
name
- the domain portion of the object name. Must conform to
the rules for elements in an ObjectName.boolean isExposeChannels()
true
if channels should be registered,
false
if notvoid setExposeChannels(boolean flag)
flag
- true
if channels should be registered,
false
if notboolean isExposeProtocols()
true
if protocols should be registered,
false
if notvoid setExposeProtocols(boolean f)
flag
- true
if protocols should be registered,
false
if notString getConfig(String stack_name) throws Exception
Exception
boolean removeConfig(String stack_name)
stack_name
- the name of the stack
true
if the stack was removed; false
if
it wasn't registeredvoid clearConfigurations()
org.jgroups.Channel createChannel(String stack_name) throws Exception
Channel
using the specified stack. Channel will use a
shared transport if the singleton-name
attribute is
set on the stack's transport protocol.
stack_name
- the name of the stack
Exception
org.jgroups.Channel createMultiplexerChannel(String stack_name, String id) throws Exception
protocol stack configuration
.
ChannelFactory.createMultiplexerChannel(String, String)
.
The returned channel will not be an instance of
org.jgroups.mux.MuxChannel
; rather a channel that uses a
shared transport will be returned. This will be the case whether or
not the protocol stack specified by stack_name
includes
a singleton_name
attribute in its
transport protocol
configuration. If no
singleton_name
attribute is present, this factory will create
a synthetic one by prepending "unnamed_" to the provided
id
param and will use that for the returned channel's
transport protocol. (Note this will not effect the protocol stack
configuration named by stack_name
; i.e. another request
that passes the same stack_name
will not inherit the
synthetic singleton name.)
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. If
clients attempt to create a Channel for an undefined stack
name an Exception will be thrown.id
- Only used if the transport protocol configuration for the
specified stack does not include the singleton_name
attribute; then it is used to create a synthetic singleton-name
for the channel's protocol stack.
org.jgroups.ChannelException
Exception
org.jgroups.Channel createMultiplexerChannel(String stack_name, String id, boolean register_for_state_transfer, String substate_id) throws Exception
protocol stack configuration
.
See createMultiplexerChannel(String, String)
; the additional
attributes specified in this overloaded version of that method are ignored.
register_for_state_transfer
- ignored in JBoss AS. Treated as false
.substate_id
- ignored in JBoss AS
org.jgroups.ChannelException
Exception
void create() throws Exception
Exception
void start() throws Exception
Exception
void stop()
Exception
void destroy()
Exception
String dumpConfiguration()
String dumpChannels()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |