com.sun.xml.ws.api.server
Class SDDocumentSource

java.lang.Object
  extended by com.sun.xml.ws.api.server.SDDocumentSource
Direct Known Subclasses:
SDDocumentImpl

public abstract class SDDocumentSource
extends java.lang.Object

SPI that provides the source of SDDocument.

This abstract class could be implemented by appliations, or one of the create(java.net.URL) methods can be used.


Constructor Summary
SDDocumentSource()
           
 
Method Summary
static SDDocumentSource create(java.net.URL url)
          Creates SDDocumentSource from an URL.
static SDDocumentSource create(java.net.URL systemId, com.sun.xml.stream.buffer.XMLStreamBuffer xsb)
          Creates a SDDocumentSource from XMLStreamBuffer.
abstract  java.net.URL getSystemId()
          System ID of this document.
abstract  javax.xml.stream.XMLStreamReader read()
          Returns the XMLStreamReader that reads the document.
abstract  javax.xml.stream.XMLStreamReader read(javax.xml.stream.XMLInputFactory xif)
          Returns the XMLStreamReader that reads the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDDocumentSource

public SDDocumentSource()
Method Detail

read

public abstract javax.xml.stream.XMLStreamReader read(javax.xml.stream.XMLInputFactory xif)
                                               throws java.io.IOException,
                                                      javax.xml.stream.XMLStreamException
Returns the XMLStreamReader that reads the document.

This method maybe invoked multiple times concurrently.

Parameters:
xif - The implementation may choose to use this object when it wants to create a new parser (or it can just ignore this parameter completely.)
Returns:
The caller is responsible for closing the reader to avoid resource leak.
Throws:
javax.xml.stream.XMLStreamException - if something goes wrong while creating a parser.
java.io.IOException - if something goes wrong trying to read the document.

read

public abstract javax.xml.stream.XMLStreamReader read()
                                               throws java.io.IOException,
                                                      javax.xml.stream.XMLStreamException
Returns the XMLStreamReader that reads the document.

This method maybe invoked multiple times concurrently.

Returns:
The caller is responsible for closing the reader to avoid resource leak.
Throws:
javax.xml.stream.XMLStreamException - if something goes wrong while creating a parser.
java.io.IOException - if something goes wrong trying to read the document.

getSystemId

public abstract java.net.URL getSystemId()
System ID of this document.


create

public static SDDocumentSource create(java.net.URL url)
Creates SDDocumentSource from an URL.


create

public static SDDocumentSource create(java.net.URL systemId,
                                      com.sun.xml.stream.buffer.XMLStreamBuffer xsb)
Creates a SDDocumentSource from XMLStreamBuffer.



Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.