|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.nmr.audit.AbstractAuditor
public abstract class AbstractAuditor
Base class for ServiceMix auditors implementations.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
AbstractAuditor()
|
|
| Method Summary | |
|---|---|
int |
deleteAllExchanges()
Delete all exchanges =from the data store. |
boolean |
deleteExchangeById(String id)
Delete the exchange with the specified id. |
boolean |
deleteExchangeByIndex(int index)
Delete a message, given its index. |
abstract int |
deleteExchangesByIds(String[] ids)
Delete exchanges given their ids. |
int |
deleteExchangesByRange(int fromIndex,
int toIndex)
Delete exchanges ranging from fromIndex to toIndex. |
void |
exchangeDelivered(Exchange exchange)
Method called each time an exchange is delivered |
void |
exchangeFailed(Exchange exchange)
Method called when an exchange resulted in an exception to be thrown and the exchange not delivered. |
String[] |
getAllExchangeIds()
Retrieve all exchanges ids from the data store. |
Exchange[] |
getAllExchanges()
Retrieve all exchanges =from the data store. |
Exchange |
getExchangeById(String id)
Retrieve the exchange for a specified id. |
Exchange |
getExchangeByIndex(int index)
Retrieve the exchange at the specified index. |
abstract int |
getExchangeCount()
Get the number of exchanges stored by this auditor. |
String |
getExchangeIdByIndex(int index)
Retrieve the exchange id of the exchange at the specified index. |
abstract String[] |
getExchangeIdsByRange(int fromIndex,
int toIndex)
Retrieve a range of message exchange ids. |
abstract Exchange[] |
getExchangesByIds(String[] ids)
Retrieve exchanges for the specified ids. |
Exchange[] |
getExchangesByRange(int fromIndex,
int toIndex)
Retrieve a range of message exchange. |
void |
resendExchange(Exchange exchange)
Resend an exchange on behalf of the consumer component that initiated this exchange. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.servicemix.nmr.api.event.ExchangeListener |
|---|
exchangeSent |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public AbstractAuditor()
| Method Detail |
|---|
public abstract int getExchangeCount()
throws AuditorException
AuditorMBean
getExchangeCount in interface AuditorMBeanAuditorException - if an error occurs accessing the data store.
public String getExchangeIdByIndex(int index)
throws AuditorException
AuditorMBean
getExchangeIdByIndex in interface AuditorMBeanindex - the index of the exchange
AuditorException - if an error occurs accessing the data store.
public String[] getAllExchangeIds()
throws AuditorException
AuditorMBean
getAllExchangeIds in interface AuditorMBeanAuditorException - if an error occurs accessing the data store.
public abstract String[] getExchangeIdsByRange(int fromIndex,
int toIndex)
throws AuditorException
AuditorMBean
getExchangeIdsByRange in interface AuditorMBeanfromIndex - the lower bound index of the ids to be retrieved.
fromIndex must be greater or equal to zero.toIndex - the upper bound (exclusive) of the ids to be retrieved.
toIndex must be greater or equal to fromIndex
AuditorException - if an error occurs accessing the data store.
public Exchange getExchangeByIndex(int index)
throws AuditorException
AuditorMBean
getExchangeByIndex in interface AuditorMBeanindex - the index of the exchange
AuditorException - if an error occurs accessing the data store.
public Exchange getExchangeById(String id)
throws AuditorException
AuditorMBean
getExchangeById in interface AuditorMBeanid - the id of the exchange
AuditorException - if an error occurs accessing the data store.
public Exchange[] getAllExchanges()
throws AuditorException
AuditorMBean
getAllExchanges in interface AuditorMBeanAuditorException - if an error occurs accessing the data store.
public Exchange[] getExchangesByRange(int fromIndex,
int toIndex)
throws AuditorException
AuditorMBean
getExchangesByRange in interface AuditorMBeanfromIndex - the lower bound index of the exchanges to be retrieved.
fromIndex must be greater or equal to zero.toIndex - the upper bound (exclusive) of the exchanges to be retrieved.
toIndex must be greater or equal to fromIndex
AuditorException - if an error occurs accessing the data store.
public abstract Exchange[] getExchangesByIds(String[] ids)
throws AuditorException
AuditorMBean
getExchangesByIds in interface AuditorMBeanids - the ids of exchanges to retrieve
AuditorException - if an error occurs accessing the data store.
public int deleteAllExchanges()
throws AuditorException
AuditorMBean
deleteAllExchanges in interface AuditorMBeanAuditorException - if an error occurs accessing the data store.
public boolean deleteExchangeByIndex(int index)
throws AuditorException
AuditorMBean
deleteExchangeByIndex in interface AuditorMBeanindex - the index of the exchange
AuditorException - if an error occurs accessing the data store.
public boolean deleteExchangeById(String id)
throws AuditorException
AuditorMBean
deleteExchangeById in interface AuditorMBeanid - the id of the exchange to delete
AuditorException - if an error occurs accessing the data store.
public int deleteExchangesByRange(int fromIndex,
int toIndex)
throws AuditorException
AuditorMBean
deleteExchangesByRange in interface AuditorMBeanfromIndex - the lower bound index of the exchanges to be retrieved.
fromIndex must be greater or equal to zero.toIndex - the upper bound (exclusive) of the exchanges to be retrieved.
toIndex must be greater or equal to fromIndex
AuditorException - if an error occurs accessing the data store.
public abstract int deleteExchangesByIds(String[] ids)
throws AuditorException
AuditorMBean
deleteExchangesByIds in interface AuditorMBeanids - the ids of exchanges to retrieve
AuditorException - if an error occurs accessing the data store.
public void resendExchange(Exchange exchange)
throws AuditorException
AuditorMBean
resendExchange in interface AuditorMBeanexchange - the exchange to be sent
AuditorException - if an error occurs re-sending the exchangepublic void exchangeDelivered(Exchange exchange)
ExchangeListener
exchangeDelivered in interface ExchangeListenerexchange - the delivered exchangepublic void exchangeFailed(Exchange exchange)
ExchangeListener
exchangeFailed in interface ExchangeListenerexchange - the exchange that failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||