public class PostOfficeImpl extends Object implements PostOffice, NotificationListener, BindingsFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
PostOfficeImpl.AddOperation |
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
BRIDGE_CACHE_STR |
static SimpleString |
HDR_RESET_QUEUE_DATA |
static SimpleString |
HDR_RESET_QUEUE_DATA_COMPLETE |
| Constructor and Description |
|---|
PostOfficeImpl(ActiveMQServer 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) |
Set<SimpleString> |
getAddresses() |
AddressManager |
getAddressManager() |
Map<SimpleString,Binding> |
getAllBindings() |
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) |
ConcurrentMap<SimpleString,DuplicateIDCache> |
getDuplicateIDCaches() |
Bindings |
getMatchingBindings(SimpleString address) |
Object |
getNotificationLock() |
ActiveMQServer |
getServer() |
boolean |
isAddressBound(SimpleString address) |
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,
Transaction tx,
boolean deleteData) |
MessageReference |
reroute(ServerMessage message,
Queue queue,
Transaction tx) |
RoutingStatus |
route(ServerMessage message,
QueueCreator queueCreator,
boolean direct) |
RoutingStatus |
route(ServerMessage message,
QueueCreator queueCreator,
RoutingContext context,
boolean direct) |
RoutingStatus |
route(ServerMessage message,
QueueCreator queueCreator,
RoutingContext context,
boolean direct,
boolean rejectDuplicates) |
RoutingStatus |
route(ServerMessage message,
QueueCreator queueCreator,
Transaction tx,
boolean direct) |
RoutingStatus |
route(ServerMessage message,
QueueCreator queueCreator,
Transaction tx,
boolean direct,
boolean rejectDuplicates) |
void |
sendQueueInfoToQueue(SimpleString queueName,
SimpleString address) |
void |
start() |
void |
startExpiryScanner()
The expiry scanner can't be started until the whole server has been started other wise you may get races
|
void |
stop() |
String |
toString() |
public static final SimpleString HDR_RESET_QUEUE_DATA
public static final SimpleString HDR_RESET_QUEUE_DATA_COMPLETE
public static final SimpleString BRIDGE_CACHE_STR
public PostOfficeImpl(ActiveMQServer 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 ActiveMQComponentExceptionpublic void stop()
throws Exception
stop in interface ActiveMQComponentExceptionpublic boolean isStarted()
isStarted in interface ActiveMQComponentpublic void onNotification(Notification notification)
onNotification in interface NotificationListenerpublic void addBinding(Binding binding) throws Exception
addBinding in interface PostOfficeExceptionpublic Binding removeBinding(SimpleString uniqueName, Transaction tx, boolean deleteData) throws Exception
removeBinding in interface PostOfficeExceptionpublic boolean isAddressBound(SimpleString address) throws Exception
isAddressBound 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 Map<SimpleString,Binding> getAllBindings()
getAllBindings in interface PostOfficepublic RoutingStatus route(ServerMessage message, QueueCreator queueCreator, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic RoutingStatus route(ServerMessage message, QueueCreator queueCreator, Transaction tx, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic RoutingStatus route(ServerMessage message, QueueCreator queueCreator, Transaction tx, boolean direct, boolean rejectDuplicates) throws Exception
route in interface PostOfficeExceptionpublic RoutingStatus route(ServerMessage message, QueueCreator queueCreator, RoutingContext context, boolean direct) throws Exception
route in interface PostOfficeExceptionpublic RoutingStatus route(ServerMessage message, QueueCreator queueCreator, 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 DuplicateIDCache getDuplicateIDCache(SimpleString address)
getDuplicateIDCache in interface PostOfficepublic ConcurrentMap<SimpleString,DuplicateIDCache> getDuplicateIDCaches()
public Object getNotificationLock()
getNotificationLock in interface PostOfficepublic Set<SimpleString> getAddresses()
getAddresses 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 void startExpiryScanner()
startExpiryScanner in interface PostOfficepublic Bindings createBindings(SimpleString address) throws Exception
createBindings in interface BindingsFactoryExceptionpublic AddressManager getAddressManager()
public ActiveMQServer getServer()
Copyright © 2018 JBoss by Red Hat. All rights reserved.