Search in sources :

Example 1 with ListProcessor

use of com.emc.vipr.client.impl.jaxb.ListProcessor in project coprhd-controller by CoprHD.

the class Logs method getAsItems.

/**
 * @deprecated Replaced by
 * @see #getAsItems(ItemProcessor, Collection, Collection, Collection, Integer, String, String, String, Integer)
 */
@Deprecated
public void getAsItems(ItemProcessor<LogMessage> processor, Collection<String> nodeIds, Collection<String> logNames, Integer severity, String start, String end, String regex, Integer maxCount) {
    ListProcessor<LogMessage> listProcessor = new ListProcessor<LogMessage>(LogMessage.class, processor);
    InputStream in = getAsStream(nodeIds, logNames, severity, start, end, regex, maxCount);
    try {
        listProcessor.process(in);
    } catch (Exception e) {
        throw new ViPRException(e);
    } finally {
        try {
            in.close();
        } catch (IOException e) {
        // Silently ignore
        }
    }
}
Also used : ListProcessor(com.emc.vipr.client.impl.jaxb.ListProcessor) LogMessage(com.emc.vipr.model.sys.logging.LogMessage) InputStream(java.io.InputStream) ViPRException(com.emc.vipr.client.exceptions.ViPRException) IOException(java.io.IOException) IOException(java.io.IOException) ViPRException(com.emc.vipr.client.exceptions.ViPRException)

Aggregations

ViPRException (com.emc.vipr.client.exceptions.ViPRException)1 ListProcessor (com.emc.vipr.client.impl.jaxb.ListProcessor)1 LogMessage (com.emc.vipr.model.sys.logging.LogMessage)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1