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
Fields inherited from class org.w3c.jigsaw.frames.HTTPFrame |
_allowed,
acceptRanges,
allowed,
ATTR_ALLOW_DEL,
ATTR_BROWSABLE,
ATTR_CONTENT_ENCODING,
ATTR_CONTENT_LANGUAGE,
ATTR_CONTENT_LENGTH,
ATTR_CONTENT_TYPE,
ATTR_ICON,
ATTR_ICONDIR,
ATTR_INDEX,
ATTR_MAXAGE,
ATTR_MD5,
ATTR_PUTABLE,
ATTR_QUALITY,
ATTR_RELOCATE,
ATTR_STYLE_LINK,
ATTR_TITLE,
browsetype,
COND_FAILED,
COND_OK,
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 |
Fields inherited from class org.w3c.tools.resources.AttributeHolder |
attributes,
slowpickle,
values |
Method Summary |
protected void |
checkContentType(org.w3c.jigsaw.http.Request request)
Check that request incomming content type. |
protected void |
error(org.w3c.jigsaw.http.Request request,
java.lang.String msg)
Trigger an HTTP exception. |
org.w3c.jigsaw.http.Reply |
extended(org.w3c.jigsaw.http.Request request)
Perform an extended request |
protected java.io.DataInputStream |
getDataInputStream(org.w3c.jigsaw.http.Request request)
Get a data input stream out of that request input stream |
protected org.w3c.jigsaw.http.Reply |
getOtherResource(org.w3c.jigsaw.http.Request request)
The default GET method for other king of associated resource |
org.w3c.tools.resources.ResourceReference |
lookup(org.w3c.jigsaw.http.Request request)
Lookup the target of the given request. |
protected org.w3c.jigsaw.http.Reply |
okReply(org.w3c.jigsaw.http.Request request)
|
protected org.w3c.jigsaw.http.Reply |
okReply(org.w3c.jigsaw.http.Request request,
byte[] bits)
|
void |
registerResource(org.w3c.tools.resources.FramedResource resource)
|
org.w3c.jigsaw.http.Reply |
remoteDeleteResource(org.w3c.jigsaw.http.Request request)
|
org.w3c.jigsaw.http.Reply |
remoteEnumerateIdentifiers(org.w3c.jigsaw.http.Request request)
Enumerate the resource identifiers of that resource. |
org.w3c.jigsaw.http.Reply |
remoteGetAttributes(org.w3c.jigsaw.http.Request request)
Get the set of attributes for the given resource. |
org.w3c.jigsaw.http.Reply |
remoteGetValues(org.w3c.jigsaw.http.Request request)
Get a set of attribute values. |
org.w3c.jigsaw.http.Reply |
remoteLoadResource(org.w3c.jigsaw.http.Request request)
Return a resource back to the client. |
org.w3c.jigsaw.http.Reply |
remoteRegisterFrame(org.w3c.jigsaw.http.Request request)
|
org.w3c.jigsaw.http.Reply |
remoteRegisterResource(org.w3c.jigsaw.http.Request request)
|
org.w3c.jigsaw.http.Reply |
remoteReindexResource(org.w3c.jigsaw.http.Request request)
|
org.w3c.jigsaw.http.Reply |
remoteSetValues(org.w3c.jigsaw.http.Request request)
Set a set of attribute values for the target resource. |
org.w3c.jigsaw.http.Reply |
remoteUnregisterFrame(org.w3c.jigsaw.http.Request request)
|
Methods inherited from class org.w3c.jigsaw.frames.HTTPFrame |
addStyleSheet,
attributeChanged,
browse,
checkIfMatch,
checkIfModifiedSince,
checkIfNoneMatch,
checkIfUnmodifiedSince,
checkRequest,
computeTrashDir,
computeTrashFile,
createDefaultReply,
createFileReply,
delete,
deleteDirectoryResource,
deleteFileResource,
deleteOtherResource,
get,
getAllowDeleteFlag,
getBrowsableFlag,
getBrowseType,
getContentEncoding,
getContentLanguage,
getContentLength,
getContentType,
getDirectoryListing,
getDirectoryResource,
getDirectoryResource,
getETag,
getFileResource,
getFileResource,
getHelpURL,
getHelpURL,
getIcon,
getIconDirectory,
getIndex,
getMaxAge,
getMD5Flag,
getPutableFlag,
getQuality,
getRelocateFlag,
getStyleSheetURL,
getTitle,
getURL,
handleRangeRequest,
head,
headDirectoryResource,
headFileResource,
headOtherResource,
link,
lookup,
lookupDirectory,
lookupFile,
lookupOther,
lookupResource,
options,
perform,
performFrames,
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,
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,
setContext,
setContext,
setValue,
updateAttributes |
Methods inherited from class org.w3c.tools.resources.AttributeHolder |
definesAttribute,
definesAttribute,
getAttributes,
getBoolean,
getChar,
getClone,
getClone,
getDouble,
getFloat,
getInt,
getLong,
getString,
getValue,
initialize,
lookupAttribute,
pickle,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unpickle,
unpickle,
unpickle,
unpickleInstance,
unpickleInstance |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
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.
BrokerFrame
public BrokerFrame(ServerHandlerManager shm,
AdminServer admin,
org.w3c.jigsaw.admin.AdminWriter writer)
registerResource
public void registerResource(org.w3c.tools.resources.FramedResource resource)
- Overrides:
- registerResource in class HTTPFrame
error
protected void error(org.w3c.jigsaw.http.Request request,
java.lang.String msg)
throws org.w3c.tools.resources.ProtocolException
- Trigger an HTTP exception.
- Parameters:
request
- The request we couldn't fulfill.msg
- The error message.- Throws:
- org.w3c.tools.resources.ProtocolException - Always thrown.
okReply
protected org.w3c.jigsaw.http.Reply okReply(org.w3c.jigsaw.http.Request request,
byte[] bits)
okReply
protected org.w3c.jigsaw.http.Reply okReply(org.w3c.jigsaw.http.Request request)
checkContentType
protected void checkContentType(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Check that request incomming content type.
- Parameters:
request
- The request to check.- Throws:
- org.w3c.tools.resources.ProtocolException - If the request type doesn't match admin.
getDataInputStream
protected java.io.DataInputStream getDataInputStream(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.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:
- org.w3c.tools.resources.ProtocolException - If we couldn't get the request's content.
lookup
public org.w3c.tools.resources.ResourceReference lookup(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Lookup the target of the given request.
- Parameters:
request
- The request whose target is to be fetched.- Returns:
- A Resource instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If the resource couldn't be located.
remoteSetValues
public org.w3c.jigsaw.http.Reply remoteSetValues(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Set a set of attribute values for the target resource.
- Parameters:
request
- The request to handle.- Returns:
- A Reply instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If some error occurs.
remoteGetValues
public org.w3c.jigsaw.http.Reply remoteGetValues(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Get a set of attribute values.
- Parameters:
request
- The request to handle.- Returns:
- A Reply instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If some error occurs.
remoteGetAttributes
public org.w3c.jigsaw.http.Reply remoteGetAttributes(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Get the set of attributes for the given resource.
- Parameters:
request
- The request to handle.- Returns:
- A Reply instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If some error occurs.
remoteEnumerateIdentifiers
public org.w3c.jigsaw.http.Reply remoteEnumerateIdentifiers(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Enumerate the resource identifiers of that resource.
- Parameters:
request
- The request to handle.- Returns:
- A Reply instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If some error occurs.
remoteLoadResource
public org.w3c.jigsaw.http.Reply remoteLoadResource(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
- Return a resource back to the client.
- Parameters:
request
- The request to handle.- Returns:
- A Reply instance.
- Throws:
- org.w3c.tools.resources.ProtocolException - If some error occurs.
remoteRegisterFrame
public org.w3c.jigsaw.http.Reply remoteRegisterFrame(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
remoteUnregisterFrame
public org.w3c.jigsaw.http.Reply remoteUnregisterFrame(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
remoteRegisterResource
public org.w3c.jigsaw.http.Reply remoteRegisterResource(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
remoteReindexResource
public org.w3c.jigsaw.http.Reply remoteReindexResource(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
remoteDeleteResource
public org.w3c.jigsaw.http.Reply remoteDeleteResource(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException
extended
public org.w3c.jigsaw.http.Reply extended(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException,
org.w3c.tools.resources.ResourceException
- Perform an extended request
- Parameters:
request
- the incomming request.- Throws:
- org.w3c.tools.resources.ProtocolException - if a protocol error occurs
- org.w3c.tools.resources.ResourceException - if a server error occurs
- Overrides:
- extended in class HTTPFrame
getOtherResource
protected org.w3c.jigsaw.http.Reply getOtherResource(org.w3c.jigsaw.http.Request request)
throws org.w3c.tools.resources.ProtocolException,
org.w3c.tools.resources.ResourceException
- The default GET method for other king of associated resource
- Parameters:
request
- The request to handle.- Throws:
- org.w3c.tools.resources.ProtocolException - If processsing the request failed.
- org.w3c.tools.resources.ResourceException - If the resource got a fatal error.
- Overrides:
- getOtherResource in class HTTPFrame