## com.sun.jersey.core.spi.scanning
Interface ScannerListener

    public interface ScannerListener

A listener for receiving events on resources from a `Scanner`.

Author:
  Paul.Sandoz@Sun.Com

Method Summary
`boolean` `onAccept(java.lang.String name)` Accept a scanned resource.
`void` `onProcess(java.lang.String name, java.io.InputStream in)` Process a scanned resource.

Method Detail

### onAccept

    boolean onAccept(java.lang.String name)

  Accept a scanned resource.

  This method will be invoked by a `Scanner` to ascertain if the listener accepts the resource for processing. If acceptable then the `Scanner` will then invoke the `onProcess(java.lang.String, java.io.InputStream)` method.

  Parameters:
    `name` - the resource name.
  Returns:
    true if the resource is accepted for processing, otherwise false.

### onProcess

    void onProcess(java.lang.String name,
                   java.io.InputStream in)
                   throws java.io.IOException

  Process a scanned resource.

  This method will be invoked after the listener has accepted the resource.

  Parameters:
    `name` - the resource name.
    `in` - the input stream of the resource
  Throws:
    `java.io.IOException` - if an error occurs when processing the resource.

Copyright © 2017 Oracle Corporation. All Rights Reserved.