    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.admin.ResourceBroker

    java.lang.Object
       |
       +----w3c.tools.store.AttributeHolder
               |
               +----w3c.tools.store.Resource
                       |
                       +----w3c.jigsaw.resources.HTTPResource
                               |
                               +----w3c.jigsaw.admin.ResourceBroker

public class ResourceBroker
extends HTTPResource

The server side resource broker.

##

admin
  The controlling ServerHandler.
conftype
  The MIME type Jigsaw uses for tunneling the admin protocol.
shm
  The ServerHandlerManager we export.
writer
  The object that knows how to write the admin protocol.

##

ResourceBroker(ServerHandlerManager, AdminServer, AdminWriter)
  A real funny way to create resources..

##

checkContentType(Request)
  Check that request incomming content type.
error(Request, String)
  Trigger an HTTP exception.
extended(Request)
  The handler for unknown method replies with a not implemented.
getDataInputStream(Request)
  Get a data input stream out of that request input stream
lookup(Request)
  Lookup the target of the given request.
okReply(Request)
okReply(Request, byte[])
remoteDeleteResource(Request)
remoteEnumerateIdentifiers(Request)
  Enumerate the resource identifiers of that resource.
remoteGetAttributes(Request)
  Get the set of attributes for the given resource.
remoteGetValues(Request)
  Get a set of attribute values.
remoteLoadResource(Request)
  Return a resource back to the client.
remoteRegisterFilter(Request)
remoteRegisterResource(Request)
remoteSetValues(Request)
  Set a set of attribute values for the target resource.
remoteUnregisterFilter(Request)

##

conftype

     public static MimeType conftype

  The MIME type Jigsaw uses for tunneling the admin protocol.

writer

     protected AdminWriter writer

  The object that knows how to write the admin protocol.

shm

     protected ServerHandlerManager shm

  The ServerHandlerManager we export.

admin

     protected AdminServer admin

  The controlling ServerHandler.

##

ResourceBroker

     public ResourceBroker(ServerHandlerManager shm,
                           AdminServer admin,
                           AdminWriter writer)

  A real funny way to create resources..

  Parameters:
    shm - The server handler manager instance to administer.
    server - The AdminServer instance.
    writer - The encoder for the Admin protocol.

##

error

     protected void error(Request request,
                          String msg) throws HTTPException

  Trigger an HTTP exception.

  Parameters:
    request - The request we couldn't fulfill.
    msg - The error message.
  Throws: HTTPException
    Always thrown.

okReply

     protected Reply okReply(Request request,
                             byte bits[])

okReply

     protected Reply okReply(Request request)

checkContentType

     protected void checkContentType(Request request) throws HTTPException

  Check that request incomming content type.

  Parameters:
    request - The request to check.
  Throws: HTTPException
    If the request type doesn't match admin.

getDataInputStream

     protected DataInputStream getDataInputStream(Request request) throws HTTPException

  Get a data input stream out of that request input stream

  Parameters:
    request - The request to get data from.
  Returns:
    A DataInputStream instance to read the request's content.
  Throws: HTTPException
    If we couldn't get the request's content.

lookup

     public Resource lookup(Request request) throws HTTPException

  Lookup the target of the given request.

  Parameters:
    request - The request whose target is to be fetched.
  Returns:
    A Resource instance.
  Throws: HTTPException
    If the resource couldn't be located.

remoteSetValues

     public Reply remoteSetValues(Request request) throws HTTPException

  Set a set of attribute values for the target resource.

  Parameters:
    request - The request to handle.
  Returns:
    A Reply instance.
  Throws: HTTPException
    If some error occurs.

remoteGetValues

     public Reply remoteGetValues(Request request) throws HTTPException

  Get a set of attribute values.

  Parameters:
    request - The request to handle.
  Returns:
    A Reply instance.
  Throws: HTTPException
    If some error occurs.

remoteGetAttributes

     public Reply remoteGetAttributes(Request request) throws HTTPException

  Get the set of attributes for the given resource.

  Parameters:
    request - The request to handle.
  Returns:
    A Reply instance.
  Throws: HTTPException
    If some error occurs.

remoteEnumerateIdentifiers

     public Reply remoteEnumerateIdentifiers(Request request) throws HTTPException

  Enumerate the resource identifiers of that resource.

  Parameters:
    request - The request to handle.
  Returns:
    A Reply instance.
  Throws: HTTPException
    If some error occurs.

remoteLoadResource

     public Reply remoteLoadResource(Request request) throws HTTPException

  Return a resource back to the client.

  Parameters:
    request - The request to handle.
  Returns:
    A Reply instance.
  Throws: HTTPException
    If some error occurs.

remoteRegisterFilter

     public Reply remoteRegisterFilter(Request request) throws HTTPException

remoteUnregisterFilter

     public Reply remoteUnregisterFilter(Request request) throws HTTPException

remoteRegisterResource

     public Reply remoteRegisterResource(Request request) throws HTTPException

remoteDeleteResource

     public Reply remoteDeleteResource(Request request) throws HTTPException

extended

     public Reply extended(Request request) throws HTTPException, ClientException

  The handler for unknown method replies with a not implemented.

  Overrides:
    extended in class HTTPResource

    All Packages  Class Hierarchy  This Package  Previous  Next  Index