|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflex.management.ManageableComponent
flex.messaging.MessageBroker
public final class MessageBroker
The MessageBroker is the hub of message traffic in the Flex system. It has a number of endpoints which send and receive messages over the network, and it has a number of services that are message destinations. The broker routes messages to endpoints based on the content type of those messages, and routes decoded messages to services based on message type. The broker also has a means of calling back into the endpoints in order to push messages back through them. Example: A RemoteObject message arrives over the RTMP endpoint. The endpoint decodes the message and sends it to the Message Broker, and the broker then passes it on to the RemotingService which will perform the RemoteObject invocation.
| Field Summary | |
|---|---|
static String |
LOG_CATEGORY
Log category for MessageBroker. |
static String |
LOG_CATEGORY_STARTUP_SERVICE
Log category that captures startup information for broker's destinations. |
static String |
TYPE
|
| Method Summary | |
|---|---|
void |
addDefaultChannel(String id)
Adds the channel id to the list of default channel ids. |
void |
addFactory(String id,
FlexFactory factory)
Registers a factory with the MessageBroker. |
void |
addService(Service service)
Add a message type -to- service mapping to the broker's collection. |
Service |
createService(String id,
String className)
Creates a Service instance, sets its id, sets it manageable
if the MessageBroker that created it is manageable,
and sets its MessageBroker to the MessageBroker that
created it. |
ConfigMap |
describeServices(Endpoint endpoint)
Describe services and the channels used by the services for the client. |
List |
getChannelIds()
Returns the list of channel ids known to the MessageBroker. |
ClassLoader |
getClassLoader()
This is the class loader used by the system to load user defined classes. |
List |
getDefaultChannels()
Returns the default channel ids of the MessageBroker. |
Map |
getFactories()
Returns the map of FlexFactory instances. |
FlexFactory |
getFactory(String id)
Returns the FlexFactory with the specified id. |
Log |
getLog()
Returns the logger of the MessageBroker. |
static MessageBroker |
getMessageBroker(String id)
Retrieves a message broker with the supplied messageBrokerId. |
flex.messaging.config.SecurityConstraint |
getSecurityConstraint(String ref)
Returns the SecurityConstraint with the indicated
reference id. |
Service |
getService(String id)
Returns the Service with the specified id. |
Map |
getServices()
Returns the Map of Service instances. |
boolean |
removeDefaultChannel(String id)
Removes the channel id from the list of default channel ids. |
FlexFactory |
removeFactory(String id)
Removes the FlexFactory from the list of factories known
by the MessageBroker. |
Service |
removeService(String id)
Removes the Service from the list of services known
by the MessageBroker. |
flex.messaging.messages.AcknowledgeMessage |
routeMessageToService(Message message,
Endpoint endpoint)
You can call this method in order to send a message from your code into the message routing system. |
void |
setDefaultChannels(List ids)
Sets the default channel ids of the MessageBroker. |
| Methods inherited from class flex.management.ManageableComponent |
|---|
getControl, getId, getParent, initialize, isManaged, isStarted, isValid, setControl, setId, setManaged, setParent, start, stop |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOG_CATEGORY
MessageBroker.
public static final String LOG_CATEGORY_STARTUP_SERVICE
public static final String TYPE
| Method Detail |
|---|
public static MessageBroker getMessageBroker(String id)
public FlexFactory getFactory(String id)
FlexFactory with the specified id.
id - The id of the FlexFactory.
FlexFactory with the specified id or null if no
factory with the id exists.public Map getFactories()
FlexFactory instances.
FlexFactory instances.
public void addFactory(String id,
FlexFactory factory)
MessageBroker.
id - The id of the factory.factory - FlexFactory instance.public FlexFactory removeFactory(String id)
FlexFactory from the list of factories known
by the MessageBroker.
id - The id of the FlexFactory.
FlexFactory that has been removed.public Service getService(String id)
Service with the specified id.
id - The id of the Service/
Service with the specified id or null if no
Service with the id exists.public Map getServices()
Service instances.
Service instances.public ConfigMap describeServices(Endpoint endpoint)
endpoint - Endpoint used to filter the destinations of the service.
public Service createService(String id,
String className)
Service instance, sets its id, sets it manageable
if the MessageBroker that created it is manageable,
and sets its MessageBroker to the MessageBroker that
created it.
id - The id of the Service.className - The class name of the Service.
Service instanced created.public void addService(Service service)
Service cannot be null, it cannot have a null
id, and it cannot have the same id or type of a Service
already registered with the MessageBroker.
Service needs to be started if the MessageBroker
is already running.
service - The service instance used to handle the messagespublic Service removeService(String id)
Service from the list of services known
by the MessageBroker.
id - The id of the Service.
Service associated with the id.public Log getLog()
MessageBroker.
MessageBroker.public List getChannelIds()
MessageBroker.
public List getDefaultChannels()
public void addDefaultChannel(String id)
id - The id of the channel to add to the list of default channel ids.public void setDefaultChannels(List ids)
ids - Default channel ids of the MessageBroker.public boolean removeDefaultChannel(String id)
id - The id of the channel to remove from the list of default channel ids.
true if the list contained the channel id.public flex.messaging.config.SecurityConstraint getSecurityConstraint(String ref)
SecurityConstraint with the indicated
reference id.
ref - The reference of the SecurityConstraint
SecurityConstraint with the indicated reference id.
public flex.messaging.messages.AcknowledgeMessage routeMessageToService(Message message,
Endpoint endpoint)
message - The message to be routed to a serviceendpoint - This can identify the endpoint that is sending the message
but it is currently not used so you may pass in null.public ClassLoader getClassLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/messaging/MessageBroker.html