Examples of AuditorException


Examples of org.apache.servicemix.jbi.audit.AuditorException

        return directory.listFiles().length;
    }

    @Override
    public String[] getExchangeIdsByRange(int fromIndex, int toIndex) throws AuditorException {
        throw new AuditorException("getExchangeIdsByRange currently unsupported by FileAuditor");
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

        throw new AuditorException("getExchangeIdsByRange currently unsupported by FileAuditor");
    }

    @Override
    public MessageExchange[] getExchangesByIds(String[] ids) throws AuditorException {
        throw new AuditorException("getExchangeByIds currently unsupported by FileAuditor");
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

        Connection connection = null;
        try {
            connection = dataSource.getConnection();
            return adapter.doGetCount(connection);
        } catch (Exception e) {
            throw new AuditorException("Could not retrieve exchange count", e);
        } finally {
            close(connection);
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

        try {
            connection = dataSource.getConnection();
            String[] ids = adapter.doGetIds(connection, fromIndex, toIndex);
            return ids;
        } catch (Exception e) {
            throw new AuditorException("Could not retrieve exchange ids", e);
        } finally {
            close(connection);
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

            for (int row = 0; row < ids.length; row++) {
                exchanges[row] = getExchange(adapter.doLoadData(connection, ids[row]));
            }
            return exchanges;
        } catch (Exception e) {
            throw new AuditorException("Could not retrieve exchanges", e);
        } finally {
            close(connection);
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

            for (int row = 0; row < ids.length; row++) {
                adapter.doRemoveData(connection, ids[row]);
            }
            return -1;
        } catch (Exception e) {
            throw new AuditorException("Could not delete exchanges", e);
        } finally {
            close(connection);
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

    protected MessageExchange getExchange(byte[] data) throws AuditorException {
        ExchangePacket packet = null;
        try {
            packet = ExchangePacket.readPacket(data);
        } catch (Exception e) {
            throw new AuditorException("Unable to reconstruct exchange", e);
        }
        URI mep = packet.getPattern();
        if (MessageExchangeSupport.IN_ONLY.equals(mep)) {
            return new InOnlyImpl(packet);
        } else if (MessageExchangeSupport.IN_OPTIONAL_OUT.equals(mep)) {
            return new InOptionalOutImpl(packet);
        } else if (MessageExchangeSupport.IN_OUT.equals(mep)) {
            return new InOutImpl(packet);
        } else if (MessageExchangeSupport.ROBUST_IN_ONLY.equals(mep)) {
            return new RobustInOnlyImpl(packet);
        } else {
            throw new AuditorException("Unhandled mep: " + mep);
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

  public int deleteExchanges(String[] ids) throws AuditorException {
    try {
      this.luceneIndexer.remove(ids);
    } catch (IOException io) {
      throw new AuditorException(io);
    }
    return this.delegatedAuditor.deleteExchanges(ids);
  }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

  public String[] getExchangeIds(String queryContent, String field) throws AuditorException {
    DefaultLuceneCallback dfc = new DefaultLuceneCallback(queryContent,field);
    try {
      return (String[])luceneIndexer.search(dfc);
    } catch (IOException e) {
      throw new AuditorException("Error while getting Exchange IDs",e);
    }
  }
View Full Code Here

Examples of org.apache.servicemix.jbi.audit.AuditorException

    public int deleteExchangesByIds(String[] ids) throws AuditorException {
        try {
            this.luceneIndexer.remove(ids);
        } catch (IOException io) {
            throw new AuditorException(io);
        }
        return this.delegatedAuditor.deleteExchangesByIds(ids);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.