org.apache.maven.scm.provider.accurev.cli
Class XppStreamConsumer

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.maven.scm.provider.accurev.cli.XppStreamConsumer
All Implemented Interfaces:
Runnable, StreamConsumer
Direct Known Subclasses:
DiffConsumer, HistoryConsumer, StatConsumer, StreamsConsumer, WorkSpaceConsumer

public abstract class XppStreamConsumer
extends Thread
implements StreamConsumer

This class is required because Plexus command line won't let you get to the process stream output process.

Author:
ggardner

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
XppStreamConsumer(ScmLogger logger)
           
 
Method Summary
protected  void caughtParseException(Exception e)
           
 void consumeLine(String line)
           
protected  void endTag(List<String> tagPath)
           
 ScmLogger getLogger()
           
protected static String getTagName(List<String> tagPath)
           
protected  void parse(XmlPullParser p)
           
 void run()
           
protected  void startTag(List<String> tagPath, Map<String,String> attributes)
           
protected  void text(List<String> tagPath, String text)
           
 void waitComplete()
          close the input and wait for parsing to complete
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XppStreamConsumer

public XppStreamConsumer(ScmLogger logger)
Method Detail

getLogger

public ScmLogger getLogger()

consumeLine

public final void consumeLine(String line)
Specified by:
consumeLine in interface StreamConsumer

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

caughtParseException

protected void caughtParseException(Exception e)

parse

protected void parse(XmlPullParser p)
              throws XmlPullParserException,
                     IOException
Throws:
XmlPullParserException
IOException

waitComplete

public void waitComplete()
close the input and wait for parsing to complete


startTag

protected void startTag(List<String> tagPath,
                        Map<String,String> attributes)

getTagName

protected static String getTagName(List<String> tagPath)

endTag

protected void endTag(List<String> tagPath)

text

protected void text(List<String> tagPath,
                    String text)


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.