|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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.frames.NegotiatedFrame
Content negotiation.
Field Summary | |
protected static int |
ATTR_PUT_POLICY
Attribute index - Should the PUT needs to be strictly checked? |
protected static int |
ATTR_VARIANTS
Attribute index - The set of names of variants. |
static java.lang.String |
DEFAULT_NEGOTIATED_ICON
Our default Icon |
static java.lang.String |
NEGOTIATED_ICON_P
Our Icon property. |
protected HttpTokenList |
vary
The Vary header field for this resource |
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,
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,
values |
Constructor Summary | |
NegotiatedFrame()
|
Method Summary | |
java.lang.String |
getIcon()
Get this resource's icon. |
boolean |
getPutPolicy()
get the "strictness" of the PUT checking |
java.lang.String[] |
getVariantNames()
Get the variant names. |
ResourceReference[] |
getVariantResources()
Get the variant resources. |
protected ResourceReference |
negotiate(Request request)
Negotiate among the various variants for the Resource. |
protected boolean |
negotiateCharsetQuality(java.util.Vector states,
Request request)
Negotiate on charsets. |
protected boolean |
negotiateContentEncoding(java.util.Vector states,
Request request)
Negotiate among content encodings. |
protected boolean |
negotiateContentType(java.util.Vector states,
Request request)
Negotiate among content types. |
protected boolean |
negotiateLanguageQuality(java.util.Vector states,
Request request)
Negotiate among language qualities. |
protected ResourceReference |
negotiatePut(Request request)
"negotiate" for a PUT, the negotiation of a PUT should be different as we just want to match the desciption of the entity and the available variants |
ReplyInterface |
perform(RequestInterface req)
Perform an HTTP request. |
protected void |
printNegotiationState(java.lang.String header,
java.util.Vector states)
Print the current negotiation state. |
void |
registerResource(FramedResource resource)
Register this frame to the given resource. |
void |
setPutPolicy(boolean strict)
|
void |
setPutPolicy(java.lang.Boolean strict)
|
void |
setVariants(java.lang.String[] variants)
|
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,
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,
pickleValues,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unsafeGetValue |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static java.lang.String NEGOTIATED_ICON_P
public static java.lang.String DEFAULT_NEGOTIATED_ICON
protected HttpTokenList vary
protected static int ATTR_VARIANTS
protected static int ATTR_PUT_POLICY
Constructor Detail |
public NegotiatedFrame()
Method Detail |
public java.lang.String getIcon()
public java.lang.String[] getVariantNames()
public void setVariants(java.lang.String[] variants)
public boolean getPutPolicy()
public void setPutPolicy(java.lang.Boolean strict)
public void setPutPolicy(boolean strict)
public ResourceReference[] getVariantResources() throws ProtocolException
protected void printNegotiationState(java.lang.String header, java.util.Vector states)
header
- The header to print first.states
- The current negotiation states.protected boolean negotiateContentEncoding(java.util.Vector states, Request request) throws ProtocolException
BUG: This will work only for single encoded variants.
states
- The current negotiation states.request
- The request to handle.protected boolean negotiateCharsetQuality(java.util.Vector states, Request request)
states
- The current states of negotiation.request
- The request to handle.protected boolean negotiateLanguageQuality(java.util.Vector states, Request request) throws ProtocolException
BUG: This will only work for variants that have one language tag.
states
- The current states of negotiation.request
- The request to handle.protected boolean negotiateContentType(java.util.Vector states, Request request) throws ProtocolException
states
- The current states of negotiation.request
- The request to handle.protected ResourceReference negotiate(Request request) throws ProtocolException
request
- the incomming request.protected ResourceReference negotiatePut(Request request) throws ProtocolException, ResourceException
request,
- the request to handlepublic void registerResource(FramedResource resource)
resource
- The resource associated with this frame.public ReplyInterface perform(RequestInterface req) throws ProtocolException, ResourceException
request
- The request to handle.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |