|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.service.TunnelService
public class TunnelService
Service tunnelling method names or client preferences via query parameters. Clients applications such as browsers can easily override the default values of their client connector by specifying additional query parameters. Here is the list of the default parameter names supported:
Property | Default name | Value type | Description |
---|---|---|---|
methodParameter | method | See values in org.restlet.data.Method | For POST requests, specify the actual method to use (DELETE, PUT, etc.). |
characterSetParameter | charset | Use extension names defined in org.restlet.service.MetadataService | For GET requests, replaces the accepted character set by the given value. |
encodingParameter | encoding | Use extension names defined in org.restlet.service.MetadataService | For GET requests, replaces the accepted encoding by the given value. |
languageParameter | language | Use extension names defined in org.restlet.service.MetadataService | For GET requests, replaces the accepted language by the given value. |
mediaTypeParameter | media | Use extension names defined in org.restlet.service.MetadataService | For GET requests, replaces the accepted media type set by the given value. |
Constructor Summary | |
---|---|
TunnelService(boolean enabled,
boolean methodTunnel,
boolean preferencesTunnel)
Constructor. |
Method Summary | |
---|---|
boolean |
allowClient(ClientInfo client)
Indicates if the request from a given client can be tunnelled. |
String |
getCharacterSetAttribute()
Returns the character set parameter name. |
String |
getEncodingAttribute()
Returns the name of the parameter containing the accepted encoding. |
String |
getLanguageAttribute()
Returns the name of the parameter containing the accepted language. |
String |
getMediaTypeAttribute()
Returns the name of the parameter containing the accepted media type. |
String |
getMethodParameter()
Returns the method parameter name. |
boolean |
isEnabled()
Indicates if the service should be enabled. |
boolean |
isMethodTunnel()
Indicates if the method name can be tunneled. |
boolean |
isPreferencesTunnel()
Indicates if the client preferences can be tunneled. |
void |
setCharacterSetAttribute(String parameterName)
Sets the character set parameter name. |
void |
setEnabled(boolean enabled)
Indicates if the service should be enabled. |
void |
setEncodingAttribute(String parameterName)
Sets the name of the parameter containing the accepted encoding. |
void |
setLanguageAttribute(String parameterName)
Sets the name of the parameter containing the accepted language. |
void |
setMediaTypeAttribute(String parameterName)
Sets the name of the parameter containing the accepted media type. |
void |
setMethodParameter(String parameterName)
Sets the method parameter name. |
void |
setMethodTunnel(boolean methodTunnel)
Indicates if the method name can be tunneled. |
void |
setPreferencesTunnel(boolean preferencesTunnel)
Indicates if the client preferences can be tunneled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TunnelService(boolean enabled, boolean methodTunnel, boolean preferencesTunnel)
enabled
- True if the service has been enabled.methodTunnel
- Indicates if the method name can be tunneled.preferencesTunnel
- Indicates if the client preferences can be tunneled.Method Detail |
---|
public boolean allowClient(ClientInfo client)
client
- The client to test.
public String getCharacterSetAttribute()
public String getEncodingAttribute()
public String getLanguageAttribute()
public String getMediaTypeAttribute()
public String getMethodParameter()
public boolean isEnabled()
public boolean isMethodTunnel()
public boolean isPreferencesTunnel()
public void setCharacterSetAttribute(String parameterName)
parameterName
- The character set parameter name.public void setEnabled(boolean enabled)
enabled
- True if the service should be enabled.public void setEncodingAttribute(String parameterName)
parameterName
- The name of the parameter containing the accepted encoding.public void setLanguageAttribute(String parameterName)
parameterName
- The name of the parameter containing the accepted language.public void setMediaTypeAttribute(String parameterName)
parameterName
- The name of the parameter containing the accepted media type.public void setMethodParameter(String parameterName)
parameterName
- The method parameter name.public void setMethodTunnel(boolean methodTunnel)
methodTunnel
- True if the method name can be tunneled.public void setPreferencesTunnel(boolean preferencesTunnel)
preferencesTunnel
- True if the client preferences can be tunneled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |