public class PostOfficeImpl extends Object implements PostOffice, NotificationListener, BindingsFactory
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
BRIDGE_CACHE_STR |
static SimpleString |
HDR_RESET_QUEUE_DATA |
| Constructor and Description |
|---|
PostOfficeImpl(HornetQServer server,
StorageManager storageManager,
PagingManager pagingManager,
QueueFactory bindableFactory,
ManagementService managementService,
long reaperPeriod,
int reaperPriority,
boolean enableWildCardRouting,
int idCacheSize,
boolean persistIDCache,
HierarchicalRepository<AddressSettings> addressSettingsRepository) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBinding(Binding binding) |
protected void |
cleanupInternalPropertiesBeforeRouting(ServerMessage message) |
Bindings |
createBindings(SimpleString address) |
Binding |
getBinding(SimpleString name) |
Bindings |
getBindingsForAddress(SimpleString address)
Differently to lookupBindings, this will always create a new element on the Queue if non-existent
|
DuplicateIDCache |
getDuplicateIDCache(SimpleString address) |
Bindings |
getMatchingBindings(SimpleString address) |
Object |
getNotificationLock() |
PagingManager |
getPagingManager() |
boolean |
isStarted() |
Bindings |
lookupBindingsForAddress(SimpleString address)
It will lookup the Binding without creating an item on the Queue if non-existent
|
void |
onNotification(Notification notification) |
void |
processRoute(ServerMessage message,
RoutingContext context,
boolean direct) |
Pair<RoutingContext,ServerMessage> |
redistribute(ServerMessage message,
Queue originatingQueue,
Transaction tx)
The redistribution can't process the route right away as we may be dealing with a large message which will need to be processed on a different thread
|
Binding |
removeBinding(SimpleString uniqueName) |
MessageReference |
reroute(ServerMessage message,
Queue queue,
Transaction tx) |
void |
route(ServerMessage message,
boolean direct) |
void |
route(ServerMessage message,
RoutingContext context,
boolean direct) |
void |
route(ServerMessage message,
RoutingContext context,
boolean direct,
boolean rejectDuplicates) |
void |
route(ServerMessage message,
Transaction tx,
boolean direct) |
void |
route(ServerMessage message,
Transaction tx,
boolean direct,
boolean rejectDuplicates) |
void |
sendQueueInfoToQueue(SimpleString queueName,
SimpleString address) |
void |
start() |
void |
stop() |
String |
toString() |
public static final SimpleString HDR_RESET_QUEUE_DATA
public static final SimpleString BRIDGE_CACHE_STR
public PostOfficeImpl(HornetQServer server, StorageManager storageManager, PagingManager pagingManager, QueueFactory bindableFactory, ManagementService managementService, long reaperPeriod, int reaperPriority, boolean enableWildCardRouting, int idCacheSize, boolean persistIDCache, HierarchicalRepository<AddressSettings> addressSettingsRepository)
public void start()
throws Exception
start in interface HornetQComponentExceptionpublic void stop()
throws Exception
stop in interface HornetQComponentExceptionpublic boolean isStarted()
isStarted in interface HornetQComponentpublic void onNotification(Notification notification)
onNotification in interface NotificationListenerpublic void addBinding(Binding binding) throws Exception
addBinding in interface PostOfficeExceptionpublic Binding removeBinding(SimpleString uniqueName) throws Exception
removeBinding in interface PostOfficeExceptionpublic Bindings getBindingsForAddress(SimpleString address) throws Exception
PostOfficegetBindingsForAddress in interface PostOfficeExceptionpublic Bindings lookupBindingsForAddress(SimpleString address) throws Exception
PostOfficelookupBindingsForAddress in interface PostOfficeExceptionpublic Binding getBinding(SimpleString name)
getBinding in interface PostOfficepublic Bindings getMatchingBindings(SimpleString address) throws Exception
getMatchingBindings in interface PostOfficeExceptionpublic void route(ServerMessage message, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic void route(ServerMessage message, Transaction tx, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic void route(ServerMessage message, Transaction tx, boolean direct, boolean rejectDuplicates) throws Exception
route in interface PostOfficeExceptionpublic void route(ServerMessage message, RoutingContext context, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic void route(ServerMessage message, RoutingContext context, boolean direct, boolean rejectDuplicates) throws Exception
route in interface PostOfficeExceptionpublic MessageReference reroute(ServerMessage message, Queue queue, Transaction tx) throws Exception
reroute in interface PostOfficeExceptionpublic Pair<RoutingContext,ServerMessage> redistribute(ServerMessage message, Queue originatingQueue, Transaction tx) throws Exception
redistribute in interface PostOfficeExceptionpublic PagingManager getPagingManager()
getPagingManager in interface PostOfficepublic DuplicateIDCache getDuplicateIDCache(SimpleString address)
getDuplicateIDCache in interface PostOfficepublic Object getNotificationLock()
getNotificationLock in interface PostOfficepublic void sendQueueInfoToQueue(SimpleString queueName, SimpleString address) throws Exception
sendQueueInfoToQueue in interface PostOfficeExceptionprotected void cleanupInternalPropertiesBeforeRouting(ServerMessage message)
message - public void processRoute(ServerMessage message, RoutingContext context, boolean direct) throws Exception
processRoute in interface PostOfficeExceptionpublic Bindings createBindings(SimpleString address) throws Exception
createBindings in interface BindingsFactoryExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.