public class LoggingActiveMQServerPlugin extends Object implements ActiveMQServerPlugin, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
LOG_ALL_EVENTS |
static String |
LOG_CONNECTION_EVENTS |
static String |
LOG_CONSUMER_EVENTS |
static String |
LOG_DELIVERING_EVENTS |
static String |
LOG_INTERNAL_EVENTS |
static String |
LOG_SENDING_EVENTS |
static String |
LOG_SESSION_EVENTS |
static String |
UNAVAILABLE |
Constructor and Description |
---|
LoggingActiveMQServerPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
afterCloseConsumer(ServerConsumer consumer,
boolean failed)
After a consumer is closed
|
void |
afterCloseSession(ServerSession session,
boolean failed)
After a session is closed
|
void |
afterCreateConnection(RemotingConnection connection)
A connection has been created.
|
void |
afterCreateConsumer(ServerConsumer consumer)
After a consumer has been created
|
void |
afterCreateQueue(Queue queue)
After a queue has been created
|
void |
afterCreateSession(ServerSession session)
After a session has been created.
|
void |
afterDeliver(ServerConsumer consumer,
MessageReference reference)
After a message is delivered to a client consumer
|
void |
afterDeployBridge(Bridge bridge)
After a bridge has been deployed
|
void |
afterDestroyConnection(RemotingConnection connection)
A connection has been destroyed.
|
void |
afterDestroyQueue(Queue queue,
SimpleString address,
SecurityAuth session,
boolean checkConsumerCount,
boolean removeConsumers,
boolean autoDeleteAddress)
After a queue has been destroyed
|
void |
afterMessageRoute(Message message,
RoutingContext context,
boolean direct,
boolean rejectDuplicates,
RoutingStatus result)
After a message is routed
|
void |
afterSend(ServerSession session,
Transaction tx,
Message message,
boolean direct,
boolean noAutoCreateQueue,
RoutingStatus result)
After a message is sent
|
void |
afterSessionMetadataAdded(ServerSession session,
String key,
String data)
After session metadata is added to the session
|
void |
beforeCloseConsumer(ServerConsumer consumer,
boolean failed)
Before a consumer is closed
|
void |
beforeCloseSession(ServerSession session,
boolean failed)
Before a session is closed
|
void |
beforeCreateConsumer(long consumerID,
QueueBinding queueBinding,
SimpleString filterString,
boolean browseOnly,
boolean supportLargeMessage)
Before a consumer is created
|
void |
beforeCreateQueue(QueueConfig queueConfig)
Before a queue is created
|
void |
beforeCreateSession(String name,
String username,
int minLargeMessageSize,
RemotingConnection connection,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
boolean xa,
String publicAddress,
SessionCallback callback,
boolean autoCreateQueues,
OperationContext context,
Map<SimpleString,RoutingType> prefixes)
Before a session is created.
|
void |
beforeDeliver(ServerConsumer consumer,
MessageReference reference)
Before a message is delivered to a client consumer
|
void |
beforeDeployBridge(BridgeConfiguration config)
Before a bridge is deployed
|
void |
beforeDestroyQueue(SimpleString queueName,
SecurityAuth session,
boolean checkConsumerCount,
boolean removeConsumers,
boolean autoDeleteAddress)
Before a queue is destroyed
|
void |
beforeMessageRoute(Message message,
RoutingContext context,
boolean direct,
boolean rejectDuplicates)
Before a message is routed
|
void |
beforeSend(ServerSession session,
Transaction tx,
Message message,
boolean direct,
boolean noAutoCreateQueue)
Before a message is sent
|
void |
beforeSessionMetadataAdded(ServerSession session,
String key,
String data)
Before session metadata is added to the session
|
void |
criticalFailure(CriticalComponent components)
A Critical failure has been detected.
|
void |
init(Map<String,String> properties)
used to pass configured properties to Plugin
|
boolean |
isLogAll() |
boolean |
isLogConnectionEvents() |
boolean |
isLogConsumerEvents() |
boolean |
isLogDeliveringEvents() |
boolean |
isLogInternalEvents() |
boolean |
isLogSendingEvents() |
boolean |
isLogSessionEvents() |
void |
messageAcknowledged(MessageReference ref,
AckReason reason,
ServerConsumer consumer)
A message has been acknowledged
|
void |
messageExpired(MessageReference message,
SimpleString messageExpiryAddress,
ServerConsumer consumer)
A message has been expired
|
void |
onMessageRouteException(Message message,
RoutingContext context,
boolean direct,
boolean rejectDuplicates,
Exception e)
When there was an error routing the message
|
void |
onSendException(ServerSession session,
Transaction tx,
Message message,
boolean direct,
boolean noAutoCreateQueue,
Exception e)
When there was an exception sending the message
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
duplicateSessionMetadataFailure
beforeCreateConsumer
afterAddAddress, afterRemoveAddress, afterUpdateAddress, beforeAddAddress, beforeRemoveAddress, beforeUpdateAddress
beforeDestroyQueue
afterAddBinding, afterRemoveBinding, beforeAddBinding, beforeRemoveBinding
afterDeliver, afterSend, beforeDeliver, beforeSend, messageAcknowledged, messageExpired
afterAcknowledgeBridge, afterDeliverBridge, beforeDeliverBridge
registered, unregistered
public static final String LOG_ALL_EVENTS
public static final String LOG_CONNECTION_EVENTS
public static final String LOG_SESSION_EVENTS
public static final String LOG_CONSUMER_EVENTS
public static final String LOG_DELIVERING_EVENTS
public static final String LOG_SENDING_EVENTS
public static final String LOG_INTERNAL_EVENTS
public static final String UNAVAILABLE
public boolean isLogAll()
public boolean isLogConnectionEvents()
public boolean isLogSessionEvents()
public boolean isLogConsumerEvents()
public boolean isLogDeliveringEvents()
public boolean isLogSendingEvents()
public boolean isLogInternalEvents()
public void init(Map<String,String> properties)
init
in interface ActiveMQServerBasePlugin
properties
- public void afterCreateConnection(RemotingConnection connection) throws ActiveMQException
afterCreateConnection
in interface ActiveMQServerConnectionPlugin
connection
- The newly created connectionActiveMQException
public void afterDestroyConnection(RemotingConnection connection) throws ActiveMQException
afterDestroyConnection
in interface ActiveMQServerConnectionPlugin
connection
- ActiveMQException
public void beforeCreateSession(String name, String username, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String publicAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString,RoutingType> prefixes) throws ActiveMQException
beforeCreateSession
in interface ActiveMQServerSessionPlugin
name
- username
- minLargeMessageSize
- connection
- autoCommitSends
- autoCommitAcks
- preAcknowledge
- xa
- publicAddress
- callback
- autoCreateQueues
- context
- prefixes
- ActiveMQException
public void afterCreateSession(ServerSession session) throws ActiveMQException
afterCreateSession
in interface ActiveMQServerSessionPlugin
session
- The newly created sessionActiveMQException
public void beforeCloseSession(ServerSession session, boolean failed) throws ActiveMQException
beforeCloseSession
in interface ActiveMQServerSessionPlugin
session
- failed
- ActiveMQException
public void afterCloseSession(ServerSession session, boolean failed) throws ActiveMQException
afterCloseSession
in interface ActiveMQServerSessionPlugin
session
- failed
- ActiveMQException
public void beforeSessionMetadataAdded(ServerSession session, String key, String data) throws ActiveMQException
beforeSessionMetadataAdded
in interface ActiveMQServerSessionPlugin
session
- key
- data
- ActiveMQException
public void afterSessionMetadataAdded(ServerSession session, String key, String data) throws ActiveMQException
afterSessionMetadataAdded
in interface ActiveMQServerSessionPlugin
session
- key
- data
- ActiveMQException
public void beforeCreateConsumer(long consumerID, QueueBinding queueBinding, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage) throws ActiveMQException
beforeCreateConsumer
in interface ActiveMQServerConsumerPlugin
consumerID
- queueBinding
- filterString
- browseOnly
- supportLargeMessage
- ActiveMQException
public void afterCreateConsumer(ServerConsumer consumer) throws ActiveMQException
afterCreateConsumer
in interface ActiveMQServerConsumerPlugin
consumer
- the created consumerActiveMQException
public void beforeCloseConsumer(ServerConsumer consumer, boolean failed) throws ActiveMQException
beforeCloseConsumer
in interface ActiveMQServerConsumerPlugin
consumer
- failed
- ActiveMQException
public void afterCloseConsumer(ServerConsumer consumer, boolean failed) throws ActiveMQException
afterCloseConsumer
in interface ActiveMQServerConsumerPlugin
consumer
- failed
- ActiveMQException
public void beforeCreateQueue(QueueConfig queueConfig) throws ActiveMQException
beforeCreateQueue
in interface ActiveMQServerQueuePlugin
queueConfig
- ActiveMQException
public void afterCreateQueue(Queue queue) throws ActiveMQException
afterCreateQueue
in interface ActiveMQServerQueuePlugin
queue
- The newly created queueActiveMQException
public void beforeDestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException
beforeDestroyQueue
in interface ActiveMQServerQueuePlugin
queueName
- session
- checkConsumerCount
- removeConsumers
- autoDeleteAddress
- ActiveMQException
public void afterDestroyQueue(Queue queue, SimpleString address, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException
afterDestroyQueue
in interface ActiveMQServerQueuePlugin
queue
- address
- session
- checkConsumerCount
- removeConsumers
- autoDeleteAddress
- ActiveMQException
public void beforeSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue) throws ActiveMQException
beforeSend
in interface ActiveMQServerMessagePlugin
session
- the session that sends the messagetx
- message
- direct
- noAutoCreateQueue
- ActiveMQException
public void afterSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, RoutingStatus result) throws ActiveMQException
afterSend
in interface ActiveMQServerMessagePlugin
session
- the session that sends the messagetx
- message
- direct
- noAutoCreateQueue
- result
- ActiveMQException
public void onSendException(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, Exception e) throws ActiveMQException
ActiveMQServerMessagePlugin
onSendException
in interface ActiveMQServerMessagePlugin
e
- the exception that occurred when sending the messageActiveMQException
public void beforeMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates) throws ActiveMQException
beforeMessageRoute
in interface ActiveMQServerMessagePlugin
message
- context
- direct
- rejectDuplicates
- ActiveMQException
public void afterMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, RoutingStatus result) throws ActiveMQException
afterMessageRoute
in interface ActiveMQServerMessagePlugin
message
- context
- direct
- rejectDuplicates
- result
- ActiveMQException
public void onMessageRouteException(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, Exception e) throws ActiveMQException
ActiveMQServerMessagePlugin
onMessageRouteException
in interface ActiveMQServerMessagePlugin
e
- the exception that occurred during message routingActiveMQException
public void beforeDeliver(ServerConsumer consumer, MessageReference reference) throws ActiveMQException
beforeDeliver
in interface ActiveMQServerMessagePlugin
consumer
- the consumer the message will be delivered toreference
- message referenceActiveMQException
public void afterDeliver(ServerConsumer consumer, MessageReference reference) throws ActiveMQException
afterDeliver
in interface ActiveMQServerMessagePlugin
consumer
- the consumer the message was delivered toreference
- message referenceActiveMQException
public void messageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer)
ActiveMQServerMessagePlugin
messageExpired
in interface ActiveMQServerMessagePlugin
message
- The expired messagemessageExpiryAddress
- The message expiry address if existsconsumer
- the Consumer that acknowledged the message - this field is optional
and can be nullpublic void messageAcknowledged(MessageReference ref, AckReason reason, ServerConsumer consumer) throws ActiveMQException
messageAcknowledged
in interface ActiveMQServerMessagePlugin
ref
- The acked messagereason
- The ack reasonconsumer
- the Consumer that acknowledged the message - this field is optional
and can be nullActiveMQException
public void beforeDeployBridge(BridgeConfiguration config) throws ActiveMQException
beforeDeployBridge
in interface ActiveMQServerBridgePlugin
config
- The bridge configurationActiveMQException
public void afterDeployBridge(Bridge bridge) throws ActiveMQException
afterDeployBridge
in interface ActiveMQServerBridgePlugin
bridge
- The newly deployed bridgeActiveMQException
public void criticalFailure(CriticalComponent components) throws ActiveMQException
criticalFailure
in interface ActiveMQServerCriticalPlugin
components
- ActiveMQException
Copyright © 2019 JBoss by Red Hat. All rights reserved.