Class DefaultVOMSACService.Builder
java.lang.Object
org.italiangrid.voms.request.impl.DefaultVOMSACService.Builder
- Enclosing class:
DefaultVOMSACService
Creates a
DefaultVOMSACService object. The DefaultVOMSACService parameters can
be set with the appropriate methods. Example:
{
@code
VOMSACService acService =
new DefaultVOMSACService.Builder(certChainValidator).requestListener(requestListener)
.serverInfoStoreListener(serverInfoStoreListener)
.protocolListener(protocolListener)
.build();
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected VOMSProtocolThe http protocol implementationprotected VOMSProtocolThe voms legacy protocol implementation -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(eu.emi.security.authn.x509.X509CertChainValidatorExt certChainValidator) Creates a Builder for aDefaultVOMSACService. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theDefaultVOMSACServiceprotected voidBuilds default protocols if neededprotected voidBuilds the server info storeconnectTimeout(int timeout) Sets the connect timeout (in millisecods) for theDefaultVOMSACServicethat this builder is creatinghttpProtocol(VOMSProtocol httpProtocol) Sets the http protocol implementationlegacyProtocol(VOMSProtocol legacyProtocol) Sets the legacy protocol implementationlegacyProtocolEnabled(boolean lpe) Enables/disables the fallback the VOMS legacy protocol.Sets theVOMSProtocolListenerfor theDefaultVOMSACServicethat this builder is creatingreadTimeout(int timeout) Sets the read timeout (in milliseconds) for theDefaultVOMSACServicethat this builder is creatingSets the request listener for theDefaultVOMSACServicethat this builder is creatingSets theVOMSServerInfoStorefor theDefaultVOMSACServicethat this builder is creatingSets theVOMSServerInfoStoreListenerfor theDefaultVOMSACServicethat this builder is creatingskipHostnameChecks(boolean s) Sets a flag to skip VOMS hostname checking.vomsesLocations(List<String> vomsesLocations) Sets a list of locations that will be used to build aVOMSESLookupStrategyfor theDefaultVOMSACServicethat this builder is creatingvomsesLookupStrategy(VOMSESLookupStrategy strategy) Sets the vomses lookup strategy for theDefaultVOMSACServicethat this builder is creating
-
Field Details
-
httpProtocol
The http protocol implementation -
legacyProtocol
The voms legacy protocol implementation
-
-
Constructor Details
-
Builder
public Builder(eu.emi.security.authn.x509.X509CertChainValidatorExt certChainValidator) Creates a Builder for aDefaultVOMSACService.- Parameters:
certChainValidator- the validator to use to setup the SSL connection and validate the certificates
-
-
Method Details
-
requestListener
Sets the request listener for theDefaultVOMSACServicethat this builder is creating- Parameters:
l- the request listener that will receive notifications about request events- Returns:
- this
DefaultVOMSACService.Builderinstance
-
serverInfoStoreListener
Sets theVOMSServerInfoStoreListenerfor theDefaultVOMSACServicethat this builder is creating- Parameters:
sl- the store listener that will receive notifications about store events- Returns:
- this
DefaultVOMSACService.Builderinstance
-
serverInfoStore
Sets theVOMSServerInfoStorefor theDefaultVOMSACServicethat this builder is creating- Parameters:
sis- aVOMSServerInfoStoreobject- Returns:
- this
DefaultVOMSACService.Builderinstance
-
protocolListener
Sets theVOMSProtocolListenerfor theDefaultVOMSACServicethat this builder is creating- Parameters:
pl- theVOMSProtocolListenerthat will receive notifications about protocol events- Returns:
- this
DefaultVOMSACService.Builderinstance
-
connectTimeout
Sets the connect timeout (in millisecods) for theDefaultVOMSACServicethat this builder is creating- Parameters:
timeout- the timeout value in milliseconds- Returns:
- this
DefaultVOMSACService.Builderinstance
-
readTimeout
Sets the read timeout (in milliseconds) for theDefaultVOMSACServicethat this builder is creating- Parameters:
timeout- the timeout value in milliseconds- Returns:
- this
DefaultVOMSACService.Builderinstance
-
skipHostnameChecks
Sets a flag to skip VOMS hostname checking. Allows for creative VOMS server side certificate configuration.- Parameters:
s-trueto skip the checks,falseotherwise- Returns:
- this
DefaultVOMSACService.Builderinstance
-
vomsesLookupStrategy
Sets the vomses lookup strategy for theDefaultVOMSACServicethat this builder is creating- Parameters:
strategy- theVOMSESLookupStrategyobject- Returns:
- this
DefaultVOMSACService.Builderinstance
-
vomsesLocations
Sets a list of locations that will be used to build aVOMSESLookupStrategyfor theDefaultVOMSACServicethat this builder is creating- Parameters:
vomsesLocations- a list of paths where vomses information will be looked for- Returns:
- this
DefaultVOMSACService.Builderinstance
-
httpProtocol
Sets the http protocol implementation- Parameters:
httpProtocol- the http protocol implementatino- Returns:
- this
DefaultVOMSACService.Builderinstance
-
legacyProtocol
Sets the legacy protocol implementation- Parameters:
legacyProtocol- the legacy protocol implementation- Returns:
- the
DefaultVOMSACService.Builder
-
legacyProtocolEnabled
Enables/disables the fallback the VOMS legacy protocol.- Parameters:
lpe-trueto enable the legacy protocol,falseotherwise- Returns:
- this
DefaultVOMSACService.Builderinstance
-
buildServerInfoStore
protected void buildServerInfoStore()Builds the server info store -
buildProtocols
protected void buildProtocols()Builds default protocols if needed -
build
Builds theDefaultVOMSACService- Returns:
- a
DefaultVOMSACServiceconfigured as required by this builder
-