org.apache.commons.feedparser.network
Class BlockingResourceRequest

java.lang.Object
  |
  +--org.apache.commons.feedparser.network.BaseResourceRequest
        |
        +--org.apache.commons.feedparser.network.BlockingResourceRequest
All Implemented Interfaces:
ResourceRequest

public class BlockingResourceRequest
extends BaseResourceRequest
implements ResourceRequest

A blocking request that waits for a specified or random amount of time. SCHEME - block://localhost/?duration=100

Version:
$Id: BlockingResourceRequest.java 159216 2005-03-27 23:37:28Z burton $

Field Summary
static java.lang.String SCHEME
           
 
Fields inherited from class org.apache.commons.feedparser.network.BaseResourceRequest
FOLLOW_REDIRECTS
 
Constructor Summary
BlockingResourceRequest()
           
 
Method Summary
 java.io.InputStream getInputStream()
          Get an input stream for this content.
 void init()
          Perform all initialization and connection to the remote server.
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.apache.commons.feedparser.network.BaseResourceRequest
fireDataEvent, fireDataEvent, fireInit, fireOnClosed, getContentLength, getEtag, getFollowRedirects, getHeaderField, getIfModifiedSince, getInputStreamAsByteArray, getInputStreamAsString, getLocalInputStream, getLocalInputStreamAsByteArray, getRequestHeaderField, getRequestHeaderFields, getResource, getResourceFromRedirect, getResponseCode, setEtag, setEventListener, setFollowRedirects, setIfModifiedSince, setLocalCache, setRequestHeaderField, setRequestMethod, setResource, setResponseCode, toOutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.feedparser.network.ResourceRequest
getContentLength, getEtag, getFollowRedirects, getHeaderField, getIfModifiedSince, getInputStreamAsByteArray, getInputStreamAsString, getLocalInputStream, getLocalInputStreamAsByteArray, getRequestHeaderField, getRequestHeaderFields, getResource, getResourceFromRedirect, getResponseCode, setEtag, setEventListener, setFollowRedirects, setIfModifiedSince, setLocalCache, setRequestHeaderField, setRequestMethod, setResource, setResponseCode, toOutputStream
 

Field Detail

SCHEME

public static final java.lang.String SCHEME
See Also:
Constant Field Values
Constructor Detail

BlockingResourceRequest

public BlockingResourceRequest()
Method Detail

init

public void init()
          throws java.io.IOException
Description copied from interface: ResourceRequest
Perform all initialization and connection to the remote server. This should always be called BEFORE network getInputStream() if you want to perform other operations first. When using a HEAD request this must be used and not getInputStream()

Specified by:
init in interface ResourceRequest
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: ResourceRequest
Get an input stream for this content.

Specified by:
getInputStream in interface ResourceRequest
java.io.IOException

main

public static void main(java.lang.String[] args)


Copyright © 2004-2006 Apache Software Foundation. All Rights Reserved.