Google Data APIs Client Library (1.41.1)



com.google.gdata.data.batch
Class BatchInterrupted

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ExtensionPoint
          extended by com.google.gdata.data.batch.BatchInterrupted
All Implemented Interfaces:
IBatchInterrupted, Extension

public class BatchInterrupted
extends ExtensionPoint
implements Extension, IBatchInterrupted

Entry extension for the element <batch:interrupted>, which marks the batch feed as having been aborted.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
 
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
AbstractExtension.AttributesHandler
 
Field Summary
 
Fields inherited from class com.google.gdata.data.ExtensionPoint
xmlBlob
 
Fields inherited from class com.google.gdata.data.AbstractExtension
localName, namespace
 
Constructor Summary
BatchInterrupted()
          Creates an empty object.
BatchInterrupted(java.lang.String reason, int totalCount, int successCount, int errorCount)
          Creates and initializes a BatchInterrupted object.
BatchInterrupted(java.lang.Throwable cause, int totalCount, int successCount, int errorCount)
          Creates and initializes a BatchInterrupted object.
 
Method Summary
 void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates an XML representation for batch:interrupted.
 java.lang.String getContent()
          Gets this tag content.
 ContentType getContentType()
          Describe the content of this tag.
static ExtensionDescription getDefaultDescription()
          Returns the suggested extension description.
 int getErrorCount()
          Gets the number of entries that were rejected.
 XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          Creates an XML ElementHandler that will initialize the object based on a tag batch:interrupted parsed by the XML parser.
 java.lang.String getReason()
          Gets a short message describing what happened.
 int getSkippedCount()
          Gets the number of entries that were skipped.
 int getSuccessCount()
          Gets the number of entries that were processed successfully.
 int getTotalCount()
          Gets the total number of entries read.
 void setContent(java.lang.String content)
          Sets this tag content.
 void setContentType(ContentType contentType)
          Sets the content type for this tag.
 
Methods inherited from class com.google.gdata.data.ExtensionPoint
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren
 
Methods inherited from class com.google.gdata.data.AbstractExtension
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchInterrupted

public BatchInterrupted(java.lang.String reason,
                        int totalCount,
                        int successCount,
                        int errorCount)
Creates and initializes a BatchInterrupted object.

Parameters:
reason - exception that caused batch processing to stop
totalCount - number of entries parsed so far, note that it is to be expected that totalCount >= successCount + errorCount
successCount - number of entries processed successfully so far
errorCount - number of entries rejected so far

BatchInterrupted

public BatchInterrupted()
Creates an empty object. Usually used in conjuction with getHandler(ExtensionProfile,String,String,Attributes).


BatchInterrupted

public BatchInterrupted(java.lang.Throwable cause,
                        int totalCount,
                        int successCount,
                        int errorCount)
Creates and initializes a BatchInterrupted object.

Parameters:
cause - exception that caused batch processing to stop
totalCount - number of entries parsed so far, note that it is to be expected that totalCount >= successCount + errorCount
successCount - number of entries processed successfully so far
errorCount - number of entries rejected so far
Method Detail

getDefaultDescription

public static ExtensionDescription getDefaultDescription()
Returns the suggested extension description.


getReason

public java.lang.String getReason()
Gets a short message describing what happened.

Specified by:
getReason in interface IBatchInterrupted
Returns:
the reason for the interruption.

getTotalCount

public int getTotalCount()
Gets the total number of entries read.

Specified by:
getTotalCount in interface IBatchInterrupted
Returns:
total number of parsed entries.

getSuccessCount

public int getSuccessCount()
Gets the number of entries that were processed successfully.

Specified by:
getSuccessCount in interface IBatchInterrupted
Returns:
number of successfully processed entries.

getErrorCount

public int getErrorCount()
Gets the number of entries that were rejected.

Specified by:
getErrorCount in interface IBatchInterrupted
Returns:
the number of entries which failed.

getSkippedCount

public int getSkippedCount()
Gets the number of entries that were skipped.

Specified by:
getSkippedCount in interface IBatchInterrupted
Returns:
the number of skipped entries.

getContentType

public ContentType getContentType()
Describe the content of this tag.

Specified by:
getContentType in interface IBatchInterrupted
Returns:
the content type.

setContentType

public void setContentType(ContentType contentType)
Sets the content type for this tag.


getContent

public java.lang.String getContent()
Gets this tag content. See also getContentType().

Specified by:
getContent in interface IBatchInterrupted
Returns:
the content of the element.

setContent

public void setContent(java.lang.String content)
Sets this tag content. The type must correspond contentType.


generate

public void generate(com.google.gdata.util.common.xml.XmlWriter w,
                     ExtensionProfile extProfile)
              throws java.io.IOException
Generates an XML representation for batch:interrupted.

Specified by:
generate in interface Extension
Overrides:
generate in class AbstractExtension
Parameters:
w - XML writer
extProfile - extension profile
Throws:
java.io.IOException

getHandler

public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile,
                                           java.lang.String namespace,
                                           java.lang.String localName,
                                           org.xml.sax.Attributes attrs)
                                    throws ParseException
Creates an XML ElementHandler that will initialize the object based on a tag batch:interrupted parsed by the XML parser.

Specified by:
getHandler in interface Extension
Overrides:
getHandler in class ExtensionPoint
Parameters:
extProfile -
namespace -
localName -
attrs - attributes of batch:interrupted
Returns:
a child handler linked to the current object
Throws:
ParseException