|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectflex.management.ManageableComponent
flex.messaging.services.AbstractService
flex.messaging.services.MessageService
The MessageService class is the Service implementation that manages point-to-point and publish-subscribe messaging.
| Field Summary | |
static String |
LOG_CATEGORY
The log category for messages logged out by the MessageService. |
| Fields inherited from class flex.messaging.services.AbstractService |
broker, destinations, settings, supportedMessageTypes |
| Fields inherited from interface flex.messaging.services.messaging.MessagingConstants |
ALLOW_SUBTOPICS_ELEMENT, BATCH_WRITE_SIZE_ELEMENT, DEFAULT_DURABLE_STORE, DEFAULT_MAX_CACHE_SIZE, DEFAULT_SUBTOPIC_SEPARATOR, DURABLE_STORE_TYPE_ELEMENT, IS_DURABLE_ELEMENT, MAX_CACHE_SIZE_ELEMENT, SUBTOPIC_SEPARATOR_ELEMENT, TIME_TO_LIVE_ELEMENT |
| Method Summary | |
protected void |
incrementMessageCount(boolean commandMessage)
Used to increment the message count metric for the MessageService. |
protected Message |
manageSubscriptions(CommandMessage command,
boolean useAdapter)
Processes subscription related CommandMessages. |
void |
pushMessageToClients(Message message,
boolean evalSelector)
Pushes a message to all clients that are subscribed to the destination targeted by this message. |
void |
pushMessageToClients(Set subscriberIds,
Message message,
boolean evalSelector)
This method is not invoked across a cluster, it is always locally invoked. |
void |
sendPushMessageFromPeer(Message message,
boolean evalSelector)
This method sends the passed message to clients connected to other server peer nodes in the cluster. |
void |
serviceMessageFromAdapter(Message message,
boolean sendToAllSubscribers)
This method is called from a messaging adapter to handle the delivery of messages to one or more clients. |
protected void |
setupServiceControl(MessageBroker broker)
This method is invoked to allow the MessageService to instantiate and register its
MBean control. |
| Methods inherited from class flex.messaging.services.AbstractService |
createDestination, createDestinations, getDestination, getDestinationByName, getId, getMessageBroker, getSettings, isSupportedMessage, isSupportedMessageType, serviceCommand, serviceCommonCommands, serviceMessage, setId, start, stop |
| Methods inherited from class flex.management.ManageableComponent |
getControl, isManaged, setControl, setManaged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface flex.management.Manageable |
getControl, isManaged, setControl, setManaged |
| Field Detail |
public static final String LOG_CATEGORY
MessageService.
| Method Detail |
public void serviceMessageFromAdapter(Message message,
boolean sendToAllSubscribers)
sendToAllSubscribers parameter as true, the message is
routed to all clients who are subscribed to receive messages
from this destination. When you use this method, the selector expressions
for all subscribing clients are not evaluated. If you want the selector
expressions to be evaluated, use a combination of the pushMessageToClients
method and the sendPushMessageFromPeer methods.
message - The Message to send.sendToAllSubscribers - If true, send this message to all clients
subscribed to the destination of this message. If false, send the message
only to the clientId specified in the message.
public void sendPushMessageFromPeer(Message message,
boolean evalSelector)
message - The Message to push to peer server nodes in the cluster.evalSelector - true to evaluate each remote subscriber's selector before pushing
the message to them; false to skip selector evaluation.
public void pushMessageToClients(Message message,
boolean evalSelector)
message - The Message to push to the destination's subscribers.evalSelector - true to evaluate each subscriber's selector before pushing
the message to them; false to skip selector evaluation.
public void pushMessageToClients(Set subscriberIds,
Message message,
boolean evalSelector)
subscriberIds - The set of subscribers to push the message to.message - The Message to push.evalSelector - true to evaluate each subscriber's selector before pushing
the message to them; false to skip selector evaluation.protected void incrementMessageCount(boolean commandMessage)
MessageService. This value is
stored in the corresponding MBean. The MessageService already invokes this method
in its serviceMessage() and serviceCommand() implementations, but it
a subclass overrides these methods completely it should invoke this method appropriately as
it processes messages.
commandMessage - Pass true if the message being processed is a CommandMessage;
otherwise false.
protected Message manageSubscriptions(CommandMessage command,
boolean useAdapter)
CommandMessages. Subclasses that perform additional
custom subscription management should invoke super.manageSubscriptions() if they
choose to override this method.
command - The CommandMessage to process.useAdapter - true if the destination's adapter manages subscriptions; otherwise false.
Message result for the passed CommandMessage.protected void setupServiceControl(MessageBroker broker)
MessageService to instantiate and register its
MBean control.
broker - The MessageBroker to pass to the MessageServiceControl constructor.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||