|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.sma.SmaObject
com.neeve.sma.MessageBusDescriptor
public final class MessageBusDescriptor
A message bus descriptor.
This class contains information used to describe a message bus. It is intended for use by a user when establishing bus bindings. It also contains methods to persist and load descriptors to/from X Platform configuration repositories.
Field Summary | |
---|---|
static String |
PROPNAME_ADDRESS
|
static String |
PROPNAME_PROVIDER_NAME
|
Method Summary | |
---|---|
MessageBusDescriptor |
addChannel(MessageChannelDescriptor channelDescriptor)
Add a channel descriptor. |
static MessageBusDescriptor |
create(String name)
Create a default message bus descriptor. |
void |
delete()
Delete a message bus descriptor from the default configuration repository. |
void |
delete(IConfigRepository repo)
Delete a bus descriptor from the configuration repository. |
static boolean |
exists(IConfigRepository repo,
String busName)
Checks if a message bus is configured in a configuration repository. |
static boolean |
exists(String busName)
Checks if a message bus is configured in the default configuration repository. |
MessageChannelDescriptor |
getChannel(String channelName)
Get a channel descriptor. |
int |
getChannelCount()
Get the number of channels in the bus. |
Set<MessageChannelDescriptor> |
getChannels()
Get the set of channel descriptors. |
String |
getName()
Get the name of the bus that this descriptor describes |
Properties |
getProviderConfig()
Get the provider configuration configuration. |
com.neeve.util.UtlAddressDescriptor |
getProviderConfigAsAddressDescriptor()
Get the provider configuration as an address descriptor string |
static MessageBusDescriptor |
load(IConfigRepository repo,
String name,
String userName)
Create a message bus descriptor from a configuration respository. |
static MessageBusDescriptor |
load(String name)
Create a bus descriptor from the default configuration respository. |
static MessageBusDescriptor |
load(String name,
String userName)
Create a bus descriptor from the default configuration respository. |
static Set<MessageBusDescriptor> |
loadAll()
Create bus descriptors for all buses configured in the default configuration repository. |
static Set<MessageBusDescriptor> |
loadAll(IConfigRepository repo,
String userName)
Create bus descriptors for all buses in a configuration repository. |
static Set<MessageBusDescriptor> |
loadAll(String userName)
Create bus descriptors for all buses configured in the default configuration repository. |
void |
removeChannel(String channelName)
Remove a channel descriptor. |
void |
save()
Save a message bus descriptor to the default configuration repository. |
void |
save(IConfigRepository repo,
String userName)
Save a bus descriptor to a configuration repository. |
Properties |
save(Properties props)
Save a bus descriptor to a property table. |
void |
save(String userName)
Save a message bus descriptor to the default configuration repository. |
MessageBusDescriptor |
setProviderConfig(Properties props)
Set the configuration for the provider specific portion of the bus binding that this descriptor describes. |
MessageBusDescriptor |
setProviderConfig(String descriptorStr)
Set a provider configuration from a descriptor string |
String |
toString()
Returns a string representation of this object |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPNAME_PROVIDER_NAME
public static final String PROPNAME_ADDRESS
Method Detail |
---|
public final String getName()
public final MessageBusDescriptor setProviderConfig(Properties props)
props
- The properties table that describes the provider configuration.
This parameter cannot be null.
This method sets the configuration for the provider specific portion of a bus binding using a property table.
public final MessageBusDescriptor setProviderConfig(String descriptorStr) throws SmaException
descriptorStr
- The provider configuration specified as an address
descriptor string.
SmaException
public final com.neeve.util.UtlAddressDescriptor getProviderConfigAsAddressDescriptor() throws SmaException
SmaException
- Thrown in case the PROPNAME_PROVIDER_NAME
and/or the PROPNAME_ADDRESS
properties are missing from the
provider config.public final Properties getProviderConfig()
public final MessageBusDescriptor addChannel(MessageChannelDescriptor channelDescriptor)
channelDescriptor
- The channel descriptor to add.
This method added a channel descriptor to the set of channel descriptors maintained by the bus descriptor. The added descriptor will replace a descriptor of the same channel name if present.
public final MessageChannelDescriptor getChannel(String channelName)
channelName
- The name of the channel whose descriptor to get.
public final Set<MessageChannelDescriptor> getChannels()
public final int getChannelCount()
public final void removeChannel(String channelName)
channelName
- The name of the channel whose descriptor to remove.public final Properties save(Properties props)
props
- The property table.
SmaException
- Thrown in case an error in encountered during the
saving of the descriptor.public final void save(IConfigRepository repo, String userName) throws SmaException
repo
- The root directory of the configuration respository.userName
- The name of the user on whose behalf this descriptor
should be saved. This can be null in case no user specific information
is to be written
SmaException
- Thrown in case an error in encountered during
the saving of the descriptor.This method saves a bus descriptor to a configuration repository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered by this class.
public final void save(String userName) throws SmaException
userName
- The name of the user on whose behalf this descriptor
should be saved. This can be null in case no user specific information
is to be written
SmaException
This method saves a message bus descriptor to the default configuration respository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered in this class.
public final void save() throws SmaException
SmaException
This method invokes save((String)null)
public final void delete(IConfigRepository repo) throws SmaException
repo
- The configuration respository to delete the descriptor from.
SmaException
- Thrown in case an error in encountered during the
deletion of the descriptor.This method deletes a bus descriptor from a configuration repository.
public final void delete() throws SmaException
SmaException
- Thrown in case an error in encountered during the
deletion of the descriptor.This method permanently deletes a message bus descriptor from the default configuration repository.
public final String toString()
toString
in class Object
public static boolean exists(IConfigRepository repo, String busName)
repo
- The configuration respository to check in.busName
- The name of the bus in which to check for.public static boolean exists(String busName)
busName
- The name of the bus in which to check for.public static MessageBusDescriptor create(String name)
name
- The name of the bus whose descriptor is to be prepared.public static MessageBusDescriptor load(IConfigRepository repo, String name, String userName) throws SmaException
repo
- The configuration repository from where to load the descriptor.name
- The name of the bus whose descriptor is to be prepared.userName
- The user for whom to create the descriptor. This can
be null in case user specific information is not to be loaded.
SmaException
public static MessageBusDescriptor load(String name, String userName) throws SmaException
name
- The name of the bus whose descriptor is to be prepared.userName
- The user for whom to create the descriptor. A null
value will result in no user specific information is to be loaded.
SmaException
public static MessageBusDescriptor load(String name) throws SmaException
name
- The name of the bus whose descriptor is to be prepared.
SmaException
This method invokes load(name, null)
public static Set<MessageBusDescriptor> loadAll(IConfigRepository repo, String userName) throws SmaException
repo
- The configuration respository from where to create the buses.userName
- The user for whom to create the descriptors. This can
be null in case no user specific information is to be loaded.
This method creates and initializes bus descriptors for each of the buses configured in a configuration repository.
SmaException
public static Set<MessageBusDescriptor> loadAll(String userName) throws SmaException
userName
- The user for whom to return the descriptors. This can be
null in case no user specific information is to be loaded.
This method creates and initializes buses descriptors for all the buses configured in the default configuration repository.
SmaException
public static Set<MessageBusDescriptor> loadAll() throws SmaException
This method invokes loadAll(null)
SmaException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |