## org.w3c.jigsaw.admin
Class BrokerFrame

    java.lang.Object
      |
      +--org.w3c.tools.resources.AttributeHolder
            |
            +--org.w3c.tools.resources.Resource
                  |
                  +--org.w3c.tools.resources.FramedResource
                        |
                        +--org.w3c.tools.resources.ResourceFrame
                              |
                              +--org.w3c.tools.resources.ProtocolFrame
                                    |
                                    +--org.w3c.jigsaw.frames.HTTPFrame
                                          |
                                          +--org.w3c.jigsaw.admin.BrokerFrame

public class BrokerFrame
extends HTTPFrame

Field Summary
`protected AdminServer` `admin` The controlling ServerHandler.
`protected ResourceBroker` `broker`
`protected ServerHandlerManager` `shm` The ServerHandlerManager we export.
`protected org.w3c.jigsaw.admin.AdminWriter` `writer` The object that knows how to write the admin protocol.

Fields inherited from class org.w3c.jigsaw.frames.HTTPFrame

`acceptRanges, allowed, ATTR_ALLOW_DEL, ATTR_BROWSABLE, ATTR_CHARSET, ATTR_CONTENT_ENCODING, ATTR_CONTENT_LANGUAGE, ATTR_CONTENT_LENGTH, ATTR_CONTENT_TYPE, ATTR_ICON, ATTR_ICONDIR, ATTR_INDEX, ATTR_INDEXES, ATTR_MAXAGE, ATTR_MD5, ATTR_PUTABLE, ATTR_QUALITY, ATTR_RELOCATE, ATTR_STYLE_LINK, ATTR_TITLE, browsetype, COND_FAILED, COND_OK, COND_WEAK, dresource, fresource, listing, listing_stamp, STATE_CONTENT_LOCATION`

Fields inherited from class org.w3c.tools.resources.ResourceFrame
`filterClass, frameListener, resource`

Fields inherited from class org.w3c.tools.resources.FramedResource
`ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener`

Fields inherited from class org.w3c.tools.resources.Resource
`ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL, co, id`

Fields inherited from class org.w3c.tools.resources.AttributeHolder
`attributes, values`

Constructor Summary
`BrokerFrame(ServerHandlerManager shm, AdminServer admin, org.w3c.jigsaw.admin.AdminWriter writer)`

Method Summary
`protected void` `checkContentType(Request request)` Check that request incomming content type.
`protected void` `error(Request request, java.lang.String msg)` Trigger an HTTP exception.
`Reply` `extended(Request request)` Perform an extended request
`protected java.io.InputStream` `getInputStream(Request request)` Get a data input stream out of that request input stream
`protected Reply` `getOtherResource(Request request)` The default GET method for other king of associated resource
`ResourceReference` `lookup(Request request)` Lookup the target of the given request.
`protected Reply` `okReply(Request request)`
`protected Reply` `okReply(Request request, byte[] bits)`
`void` `registerResource(FramedResource resource)` Register this frame to the given resource.
`Reply` `remoteDeleteResource(Request request)`
`Reply` `remoteLoadResource(Request request)` Return a resource back to the client.
`Reply` `remoteRegisterFrame(Request request)`
`Reply` `remoteRegisterResource(Request request)`
`Reply` `remoteReindexResource(Request request, boolean rec)`
`Reply` `remoteSetValues(Request request)` Set a set of attribute values for the target resource.
`Reply` `remoteUnregisterFrame(Request request)`

Methods inherited from class org.w3c.jigsaw.frames.HTTPFrame

`addStyleSheet, attributeChanged, browse, checkExpect, checkIfMatch, checkIfModifiedSince, checkIfNoneMatch, checkIfUnmodifiedSince, checkRequest, checkValidators, computeContainerListing, computeETag, computeTrashDir, computeTrashFile, createDefaultReply, createFileReply, delete, deleteDirectoryResource, deleteFileResource, deleteMe, deleteOtherResource, get, getAllow, getAllowDeleteFlag, getBrowsableFlag, getBrowseType, getCharset, getContentEncoding, getContentLanguage, getContentLength, getContentType, getDirectoryListing, getDirectoryResource, getDirectoryResource, getETag, getFileResource, getFileResource, getHelpURL, getHelpURL, getIcon, getIconDirectory, getIndex, getIndexes, getMaxAge, getMD5Flag, getPutableFlag, getQuality, getRelocateFlag, getStyleSheetURL, getTitle, getURL, handleRangeRequest, head, headDirectoryResource, headFileResource, headOtherResource, initialize, link, lookup, lookupDirectory, lookupFile, lookupOther, lookupResource, options, perform, performFrames, pickleValues, post, put, putFileResource, putOtherResource, registerOtherResource, setValue, trace, unlink, updateCachedHeaders`

Methods inherited from class org.w3c.tools.resources.ResourceFrame
`addFrameEventListener, eventDisabled, fireFrameEvent, frameModified, getFilters, getFilters, getFrameReference, getResource, getResourceReference, getSpaceEntry, getURLPath, lookupFilters, lookupFrames, postFrameEvent, processEvent, removeFrameEventListener, unregisterResource, updateDefaultChildAttributes`

Methods inherited from class org.w3c.tools.resources.FramedResource

`addAttributeChangedListener, addStructureChangedListener, collectFramesReference, delete, disableEvent, displayEvent, enableEvent, fireAttributeChangeEvent, fireStructureChangedEvent, fireStructureChangedEvent, frameAdded, frameRemoved, getClone, getFrame, getFrame, getFrameReference, getFrameReference, getFramesReference, getOid, initialize, markModified, notifyUnload, postAttributeChangeEvent, postEvent, postStructureChangedEvent, postStructureChangedEvent, registerFrame, registerFrameIfNone, removeAttributeChangedListener, removeStructureChangedListener, setSilentValue, setSilentValue, unregisterFrame`

Methods inherited from class org.w3c.tools.resources.Resource
`acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getIdentifier, getLastModified, getParent, getServer, getSpace, getStoreEntry, getValue, getValue, isInitialized, isUnloaded, setContext, setContext, setValue, unsafeGetContext, unsafeGetIdentifier, unsafeGetValue, updateAttributes`

Methods inherited from class org.w3c.tools.resources.AttributeHolder
`definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeGetString`

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

Field Detail

### broker

    protected ResourceBroker broker

### writer

    protected org.w3c.jigsaw.admin.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.

Constructor Detail

### BrokerFrame

    public BrokerFrame(ServerHandlerManager shm,
                       AdminServer admin,
                       org.w3c.jigsaw.admin.AdminWriter writer)

Method Detail

### registerResource

    public void registerResource(FramedResource resource)

  Description copied from class: HTTPFrame
  Register this frame to the given resource.
  Overrides:
    registerResource in class HTTPFrame
  Tags copied from class: HTTPFrame
  Parameters:
    `resource` - The resource associated with this frame.

### error

    protected void error(Request request,
                         java.lang.String msg)
                  throws ProtocolException

  Trigger an HTTP exception.
  Parameters:
    `request` - The request we couldn't fulfill.
    `msg` - The error message.
  Throws:
    ProtocolException - Always thrown.

### okReply

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

### okReply

    protected Reply okReply(Request request)

### checkContentType

    protected void checkContentType(Request request)
                             throws ProtocolException

  Check that request incomming content type.
  Parameters:
    `request` - The request to check.
  Throws:
    ProtocolException - If the request type doesn't match admin.

### getInputStream

    protected java.io.InputStream getInputStream(Request request)
                                          throws ProtocolException

  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:
    ProtocolException - If we couldn't get the request's content.

### lookup

    public ResourceReference lookup(Request request)
                             throws ProtocolException

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

### remoteSetValues

    public Reply remoteSetValues(Request request)
                          throws ProtocolException

  Set a set of attribute values for the target resource.
  Parameters:
    `request` - The request to handle.
  Returns:
    A Reply instance.
  Throws:
    ProtocolException - If some error occurs.

### remoteLoadResource

    public Reply remoteLoadResource(Request request)
                             throws ProtocolException

  Return a resource back to the client.
  Parameters:
    `request` - The request to handle.
  Returns:
    A Reply instance.
  Throws:
    ProtocolException - If some error occurs.

### remoteRegisterFrame

    public Reply remoteRegisterFrame(Request request)
                              throws ProtocolException

### remoteUnregisterFrame

    public Reply remoteUnregisterFrame(Request request)
                                throws ProtocolException

### remoteRegisterResource

    public Reply remoteRegisterResource(Request request)
                                 throws ProtocolException

### remoteReindexResource

    public Reply remoteReindexResource(Request request,
                                       boolean rec)
                                throws ProtocolException

### remoteDeleteResource

    public Reply remoteDeleteResource(Request request)
                               throws ProtocolException

### extended

    public Reply extended(Request request)
                   throws ProtocolException,
                          ResourceException

  Perform an extended request
  Overrides:
    extended in class HTTPFrame
  Parameters:
    `request` - the incomming request.
  Throws:
    ProtocolException - if a protocol error occurs
    ResourceException - if a server error occurs

### getOtherResource

    protected Reply getOtherResource(Request request)
                              throws ProtocolException,
                                     ResourceException

  The default GET method for other king of associated resource
  Overrides:
    getOtherResource in class HTTPFrame
  Parameters:
    `request` - The request to handle.
  Throws:
    ProtocolException - If processsing the request failed.
    ResourceException - If the resource got a fatal error.