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.


Variable Index

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

Constructor Index

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

Method Index

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

Variables

 o conftype
 public static MimeType conftype
The MIME type Jigsaw uses for tunneling the admin protocol.

 o writer
 protected AdminWriter writer
The object that knows how to write the admin protocol.

 o shm
 protected ServerHandlerManager shm
The ServerHandlerManager we export.

 o admin
 protected AdminServer admin
The controlling ServerHandler.

Constructors

 o 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.

Methods

 o 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.
 o okReply
 protected Reply okReply(Request request,
                         byte bits[])
 o okReply
 protected Reply okReply(Request request)
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o remoteRegisterFilter
 public Reply remoteRegisterFilter(Request request) throws HTTPException
 o remoteUnregisterFilter
 public Reply remoteUnregisterFilter(Request request) throws HTTPException
 o remoteRegisterResource
 public Reply remoteRegisterResource(Request request) throws HTTPException
 o remoteDeleteResource
 public Reply remoteDeleteResource(Request request) throws HTTPException
 o 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