org.apache.mina.coap.resource

## Class ResourceRegistry

- java.lang.Object
- - org.apache.mina.coap.resource.ResourceRegistry

-     public class ResourceRegistry
      extends Object

  The resource registry for the different `ResourceHandler`.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceRegistry()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `register(ResourceHandler handler)` Register a new resource handler.
    `CoapMessage` | `respond(CoapMessage request, IoSession session)` Response to a request : delegate it to the correct handler for the requested path.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceRegistry

          public ResourceRegistry()

  - ### Method Detail

    - #### register

          public void register(ResourceHandler handler)

      Register a new resource handler.
      Parameters:
        `handler` - the halder to register.

    - #### respond

          public CoapMessage respond(CoapMessage request,
                            IoSession session)

      Response to a request : delegate it to the correct handler for the requested path. If not found generate 4.04 CoAP errors. if .well-know/core requested : generate a discover page.
      Parameters:
        `request` - the request ot serve
      Returns:
        the response

Copyright © 2009–2013 Apache MINA Project. All rights reserved.