< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java

Print this page


   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xml.internal.dtm.ref;
  23 


  28 /** <p>CoroutineParser is an API for parser threads that operate as
  29  * coroutines. See CoroutineSAXParser and CoroutineSAXParser_Xerces
  30  * for examples.</p>
  31  *
  32  * <p>&lt;grumble&gt; I'd like the interface to require a specific form
  33  * for either the base constructor or a static factory method. Java
  34  * doesn't allow us to specify either, so I'll just document them
  35  * here:
  36  *
  37  * <ul>
  38  * <li>public CoroutineParser(CoroutineManager co, int appCoroutine);</li>
  39  * <li>public CoroutineParser createCoroutineParser(CoroutineManager co, int appCoroutine);</li>
  40  * </ul>
  41  *
  42  * &lt;/grumble&gt;</p>
  43  *
  44  * @deprecated Since the ability to start a parse via the
  45  * coroutine protocol was not being used and was complicating design.
  46  * See {@link IncrementalSAXSource}.
  47  * */

  48 public interface CoroutineParser {
  49 
  50     /** @return the coroutine ID number for this CoroutineParser object.
  51      * Note that this isn't useful unless you know which CoroutineManager
  52      * you're talking to. Also note that the do...() methods encapsulate
  53      * the common transactions with the CoroutineParser, so you shouldn't
  54      * need this in most cases.
  55      * */
  56     public int getParserCoroutineID();
  57 
  58     /** @return the CoroutineManager for this CoroutineParser object.
  59      * If you're using the do...() methods, applications should only
  60      * need to talk to the CoroutineManager once, to obtain the
  61      * application's Coroutine ID.
  62      * */
  63     public CoroutineManager getCoroutineManager();
  64 
  65   /** Register a SAX-style content handler for us to output to */
  66   public void setContentHandler(ContentHandler handler);
  67 


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xml.internal.dtm.ref;
  22 


  27 /** <p>CoroutineParser is an API for parser threads that operate as
  28  * coroutines. See CoroutineSAXParser and CoroutineSAXParser_Xerces
  29  * for examples.</p>
  30  *
  31  * <p>&lt;grumble&gt; I'd like the interface to require a specific form
  32  * for either the base constructor or a static factory method. Java
  33  * doesn't allow us to specify either, so I'll just document them
  34  * here:
  35  *
  36  * <ul>
  37  * <li>public CoroutineParser(CoroutineManager co, int appCoroutine);</li>
  38  * <li>public CoroutineParser createCoroutineParser(CoroutineManager co, int appCoroutine);</li>
  39  * </ul>
  40  *
  41  * &lt;/grumble&gt;</p>
  42  *
  43  * @deprecated Since the ability to start a parse via the
  44  * coroutine protocol was not being used and was complicating design.
  45  * See {@link IncrementalSAXSource}.
  46  * */
  47 @Deprecated
  48 public interface CoroutineParser {
  49 
  50     /** @return the coroutine ID number for this CoroutineParser object.
  51      * Note that this isn't useful unless you know which CoroutineManager
  52      * you're talking to. Also note that the do...() methods encapsulate
  53      * the common transactions with the CoroutineParser, so you shouldn't
  54      * need this in most cases.
  55      * */
  56     public int getParserCoroutineID();
  57 
  58     /** @return the CoroutineManager for this CoroutineParser object.
  59      * If you're using the do...() methods, applications should only
  60      * need to talk to the CoroutineManager once, to obtain the
  61      * application's Coroutine ID.
  62      * */
  63     public CoroutineManager getCoroutineManager();
  64 
  65   /** Register a SAX-style content handler for us to output to */
  66   public void setContentHandler(ContentHandler handler);
  67 


< prev index next >