Ce contenu n'est pas disponible dans la langue sélectionnée.
11.5. The REST Interface Connector
- The
hotrod-connectorelement, which defines the configuration for a Hot Rod based connector. - The
memcached-connectorelement, which defines the configuration for a memcached based connector. - The
rest-connectorelement, which defines the configuration for a REST interface based connector.
<socket-binding-group />, and exposing the caches declared in the local container, using defaults for all other settings. The following examples show how to connect to Hot Rod, Memcached, and REST servers.
<rest-connector virtual-server="default-host" cache-container="local" security-domain="other" auth-method="BASIC"/>
11.5.1. Configure REST Connectors Copier lienLien copié sur presse-papiers!
rest-connector element in Red Hat JBoss Data Grid's Remote Client-Server mode.
Procedure 11.1. Configuring REST Connectors for Remote Client-Server Mode
rest-connector element specifies the configuration information for the REST connector.
The
virtual-serverParameterThevirtual-serverparameter specifies the virtual server used by the REST connector. The default value for this parameter isdefault-host. This is an optional parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" /> </subsystem>The
cache-containerParameterThecache-containerparameter names the cache container used by the REST connector. This is a mandatory parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" cache-container="local" /> </subsystem>The
context-pathParameterThecontext-pathparameter specifies the context path for the REST connector. The default value for this parameter is an empty string (""). This is an optional parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" cache-container="local" context-path="${CONTEXT_PATH}" /> </subsystem>The
security-domainParameterThesecurity-domainparameter specifies that the specified domain, declared in the security subsystem, should be used to authenticate access to the REST endpoint. This is an optional parameter. If this parameter is omitted, no authentication is performed.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" cache-container="local" context-path="${CONTEXT_PATH}" security-domain="${SECURITY_DOMAIN}" /> </subsystem>The
auth-methodParameterTheauth-methodparameter specifies the method used to retrieve credentials for the end point. The default value for this parameter isBASIC. Supported alternate values includeBASIC,DIGEST, andCLIENT-CERT. This is an optional parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" cache-container="local" context-path="${CONTEXT_PATH}" security-domain="${SECURITY_DOMAIN}" auth-method="${METHOD}" /> </subsystem>The
security-modeParameterThesecurity-modeparameter specifies whether authentication is required only for write operations (such as PUT, POST and DELETE) or for read operations (such as GET and HEAD) as well. Valid values for this parameter areWRITEfor authenticating write operations only, orREAD_WRITEto authenticate read and write operations. The default value for this parameter isREAD_WRITE.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <rest-connector virtual-server="default-host" cache-container="local" context-path="${CONTEXT_PATH}" security-domain="${SECURITY_DOMAIN}" auth-method="${METHOD}" security-mode="${MODE}" /> </subsystem>