Package org.apache.servicemix.nmr.audit

Examples of org.apache.servicemix.nmr.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


                    addMessageHeadersToDocument(message, d, types[i]);
                }
            }
            return d;
        } catch (Exception ex) {
            throw new AuditorException("Error while creating Lucene Document", ex);
        }
    }
View Full Code Here

        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, false);
        }
    }
View Full Code Here

    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

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

            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, false);
        }
    }
View Full Code Here

                adapter.doRemoveData(connection, ids[row]);
            }
            connection.commit();
            return ids.length;
        } catch (Exception e) {
            throw new AuditorException("Could not delete exchanges", e);
        } finally {
            close(connection, restoreAutoCommit);
        }
    }
View Full Code Here

        try {
            Thread.currentThread().setContextClassLoader(tccl);
            ObjectInputStream is = new ObjectInputStream(new ByteArrayInputStream(data));
            return (Exchange) is.readObject();
        } catch (Exception e) {
            throw new AuditorException("Unable to reconstruct exchange", e);
        } finally {
            Thread.currentThread().setContextClassLoader(oldCl);
        }
    }
View Full Code Here

        return new BufferedOutputStream(new FileOutputStream(file));
    }

    @Override
    public int deleteExchangesByIds(String[] ids) throws AuditorException {
        throw new AuditorException("deleteExchangesById(s) currently unsupported by FileAuditor");
    }
View Full Code Here

        return FileUtil.countFilesInDirectory(directory);
    }

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

TOP

Related Classes of org.apache.servicemix.nmr.audit.AuditorException

Copyright © 2018 www.massapicom. 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.