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 HornetQComponent
Exception
public void stop() throws Exception
stop
in interface HornetQComponent
Exception
public boolean isStarted()
isStarted
in interface HornetQComponent
public void onNotification(Notification notification)
onNotification
in interface NotificationListener
public void addBinding(Binding binding) throws Exception
addBinding
in interface PostOffice
Exception
public Binding removeBinding(SimpleString uniqueName) throws Exception
removeBinding
in interface PostOffice
Exception
public Bindings getBindingsForAddress(SimpleString address) throws Exception
PostOffice
getBindingsForAddress
in interface PostOffice
Exception
public Bindings lookupBindingsForAddress(SimpleString address) throws Exception
PostOffice
lookupBindingsForAddress
in interface PostOffice
Exception
public Binding getBinding(SimpleString name)
getBinding
in interface PostOffice
public Bindings getMatchingBindings(SimpleString address) throws Exception
getMatchingBindings
in interface PostOffice
Exception
public void route(ServerMessage message, boolean direct) throws Exception
route
in interface PostOffice
Exception
public void route(ServerMessage message, Transaction tx, boolean direct) throws Exception
route
in interface PostOffice
Exception
public void route(ServerMessage message, Transaction tx, boolean direct, boolean rejectDuplicates) throws Exception
route
in interface PostOffice
Exception
public void route(ServerMessage message, RoutingContext context, boolean direct) throws Exception
route
in interface PostOffice
Exception
public void route(ServerMessage message, RoutingContext context, boolean direct, boolean rejectDuplicates) throws Exception
route
in interface PostOffice
Exception
public MessageReference reroute(ServerMessage message, Queue queue, Transaction tx) throws Exception
reroute
in interface PostOffice
Exception
public Pair<RoutingContext,ServerMessage> redistribute(ServerMessage message, Queue originatingQueue, Transaction tx) throws Exception
redistribute
in interface PostOffice
Exception
public PagingManager getPagingManager()
getPagingManager
in interface PostOffice
public DuplicateIDCache getDuplicateIDCache(SimpleString address)
getDuplicateIDCache
in interface PostOffice
public Object getNotificationLock()
getNotificationLock
in interface PostOffice
public void sendQueueInfoToQueue(SimpleString queueName, SimpleString address) throws Exception
sendQueueInfoToQueue
in interface PostOffice
Exception
protected void cleanupInternalPropertiesBeforeRouting(ServerMessage message)
message
- public void processRoute(ServerMessage message, RoutingContext context, boolean direct) throws Exception
processRoute
in interface PostOffice
Exception
public Bindings createBindings(SimpleString address) throws Exception
createBindings
in interface BindingsFactory
Exception
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.