|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
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.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.Resource |
---|
acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getIdentifier, getLastModified, getParent, getServer, getSpace, getStoreEntry, getValue, getValue, isInitialized, isUnloaded, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, 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, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ResourceBroker broker
protected org.w3c.jigsaw.admin.AdminWriter writer
protected ServerHandlerManager shm
protected AdminServer admin
Constructor Detail |
---|
public BrokerFrame(ServerHandlerManager shm, AdminServer admin, org.w3c.jigsaw.admin.AdminWriter writer)
Method Detail |
---|
public void registerResource(FramedResource resource)
HTTPFrame
registerResource
in class HTTPFrame
resource
- The resource associated with this frame.protected void error(Request request, java.lang.String msg) throws ProtocolException
request
- The request we couldn't fulfill.msg
- The error message.
ProtocolException
- Always thrown.protected Reply okReply(Request request, byte[] bits)
protected Reply okReply(Request request)
protected void checkContentType(Request request) throws ProtocolException
request
- The request to check.
ProtocolException
- If the request type doesn't match admin.protected java.io.InputStream getInputStream(Request request) throws ProtocolException
request
- The request to get data from.
ProtocolException
- If we couldn't get the request's content.public ResourceReference lookup(Request request) throws ProtocolException
request
- The request whose target is to be fetched.
ProtocolException
- If the resource couldn't be located.public Reply remoteSetValues(Request request) throws ProtocolException
request
- The request to handle.
ProtocolException
- If some error occurs.public Reply remoteLoadResource(Request request) throws ProtocolException
request
- The request to handle.
ProtocolException
- If some error occurs.public Reply remoteRegisterFrame(Request request) throws ProtocolException
ProtocolException
public Reply remoteUnregisterFrame(Request request) throws ProtocolException
ProtocolException
public Reply remoteRegisterResource(Request request) throws ProtocolException
ProtocolException
public Reply remoteReindexResource(Request request, boolean rec) throws ProtocolException
ProtocolException
public Reply remoteDeleteResource(Request request) throws ProtocolException
ProtocolException
public Reply extended(Request request) throws ProtocolException, ResourceException
extended
in class HTTPFrame
request
- the incomming request.
ProtocolException
- if a protocol error occurs
ResourceException
- if a server error occursprotected Reply getOtherResource(Request request) throws ProtocolException, ResourceException
getOtherResource
in class HTTPFrame
request
- The request to handle.
ProtocolException
- If processsing the request failed.
ResourceException
- If the resource got a fatal error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |