Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jrex.io
Class JRexStreamListenerImpl

    java.lang.Object
      org.mozilla.jrex.io.JRexStreamListenerImpl

All Implemented Interfaces:
  JRexStreamListener

public class JRexStreamListenerImpl
extends Object
implements JRexStreamListener

Class implementing JRexStreamListener interface.

Version:
  1.0
Author:
  C.N.Medappa

Constructor Summary
`JRexStreamListenerImpl()`

Method Summary
`boolean` | `onDataAvailable(String requestURI, int requestStatus, boolean isRequestPending, Object ctxt, JRexInputStream in, int off, int len)` Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.
`boolean` | `onStartRequest(String requestURI, int requestStatus, boolean isRequestPending, Object ctxt, Hashtable conInfo)` Called to signify the beginning of an asynchronous request.
`void` | `onStopRequest(String requestURI, int requestStatus, boolean isRequestPending, Object ctxt, int statusCode)` Called to signify the end of an asynchronous request.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JRexStreamListenerImpl

    public JRexStreamListenerImpl()

Method Detail

### onStartRequest

    public boolean onStartRequest(String requestURI,
                                  int requestStatus,
                                  boolean isRequestPending,
                                  Object ctxt,
                                  Hashtable conInfo)

  Description copied from interface: `JRexStreamListener`
  Called to signify the beginning of an asynchronous request.

  Specified by:
    `onStartRequest` in interface `JRexStreamListener`
  Parameters:
    `requestURI` - request URI corresponding to the source of the data
    `requestStatus` - request Status corresponding to the source of the data
    `isRequestPending` - request pending corresponding to the source of the data
    `ctxt` - user defined context
    `conInfo` - List additional information for request, E.g. the response headers for the corresponding http transaction.
  Returns:
    boolean return `false` to cancel the request.

### onStopRequest

    public void onStopRequest(String requestURI,
                              int requestStatus,
                              boolean isRequestPending,
                              Object ctxt,
                              int statusCode)

  Description copied from interface: `JRexStreamListener`
  Called to signify the end of an asynchronous request. This call is always preceded by a call to onStartRequest.

  Specified by:
    `onStopRequest` in interface `JRexStreamListener`
  Parameters:
    `requestURI` - request URI corresponding to the source of the data
    `requestStatus` - request Status corresponding to the source of the data
    `isRequestPending` - request pending corresponding to the source of the data
    `ctxt` - user defined context
    `statusCode` - reason for stopping, NS_OK if successful.

### onDataAvailable

    public boolean onDataAvailable(String requestURI,
                                   int requestStatus,
                                   boolean isRequestPending,
                                   Object ctxt,
                                   JRexInputStream in,
                                   int off,
                                   int len)

  Description copied from interface: `JRexStreamListener`
  Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread. The onDataAvailable impl must read exactly |len| bytes of data before returning.

  Specified by:
    `onDataAvailable` in interface `JRexStreamListener`
  Parameters:
    `requestURI` - request URI corresponding to the source of the data
    `requestStatus` - request Status corresponding to the source of the data
    `isRequestPending` - request pending corresponding to the source of the data
    `ctxt` - user defined context
    `in` - input stream containing the data chunk
    `off` - current stream position
    `len` - number of bytes available in the stream
  Returns:
    return `false` to cancel the request.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 C.N.Medappa. All Rights Reserved.