public final void updateMessagesStatus(Connection conn, MessageCriteria criteria, byte newStatus)
throws SQLException, IllegalStateException {
checkHandlersNotNull();
Direction direction = null;
if (criteria != null) {
direction = criteria.getDirection();
}
if (direction == null || direction.equals(Direction.TO_CONNECTIONS)) {
outboundHandler.updateMessagesStatus(conn, criteria, newStatus);
}
if (direction == null || direction.equals(Direction.TO_APPLICATIONS)) {
inboundHandler.updateMessagesStatus(conn, criteria, newStatus);
}
}