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 TypeFieldDescriptionprivate int
The connect timeout valueprotected VOMSProtocol
The http protocol implementationprotected VOMSProtocol
The voms legacy protocol implementationprivate boolean
Whether the client should attempt legacy protocol requestsprivate VOMSProtocolListener
The listener that will be informed about low-level protocol detailsprivate int
The read timeout usedprivate VOMSRequestListener
The listener that will be informed about request eventsprivate VOMSServerInfoStore
The store used to keep VOMS server contact information.private boolean
Whether the client should skip hostname checkingprivate VOMSServerInfoStoreListener
The listener that will be informed about server info store eventsprivate eu.emi.security.authn.x509.X509CertChainValidatorExt
The validator used for the SSL handshakeA list of paths where vomses information will be looked for, used to create the server info store.private VOMSESLookupStrategy
The provided strategy to lookup vomses information. -
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(eu.emi.security.authn.x509.X509CertChainValidatorExt certChainValidator) Creates a Builder for aDefaultVOMSACService
. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theDefaultVOMSACService
protected void
Builds default protocols if neededprotected void
Builds the server info storeconnectTimeout
(int timeout) Sets the connect timeout (in millisecods) for theDefaultVOMSACService
that 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 theVOMSProtocolListener
for theDefaultVOMSACService
that this builder is creatingreadTimeout
(int timeout) Sets the read timeout (in milliseconds) for theDefaultVOMSACService
that this builder is creatingSets the request listener for theDefaultVOMSACService
that this builder is creatingSets theVOMSServerInfoStore
for theDefaultVOMSACService
that this builder is creatingSets theVOMSServerInfoStoreListener
for theDefaultVOMSACService
that 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 aVOMSESLookupStrategy
for theDefaultVOMSACService
that this builder is creatingvomsesLookupStrategy
(VOMSESLookupStrategy strategy) Sets the vomses lookup strategy for theDefaultVOMSACService
that this builder is creating
-
Field Details
-
requestListener
The listener that will be informed about request events -
protocolListener
The listener that will be informed about low-level protocol details -
storeListener
The listener that will be informed about server info store events -
validator
private eu.emi.security.authn.x509.X509CertChainValidatorExt validatorThe validator used for the SSL handshake -
serverInfoStore
The store used to keep VOMS server contact information. -
vomsesLookupStrategy
The provided strategy to lookup vomses information. -
vomsesLocations
A list of paths where vomses information will be looked for, used to create the server info store. -
connectTimeout
private int connectTimeoutThe connect timeout value -
readTimeout
private int readTimeoutThe read timeout used -
skipHostnameChecks
private boolean skipHostnameChecksWhether the client should skip hostname checking -
httpProtocol
The http protocol implementation -
legacyProtocol
The voms legacy protocol implementation -
legacyProtocolEnabled
private boolean legacyProtocolEnabledWhether the client should attempt legacy protocol requests
-
-
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 theDefaultVOMSACService
that this builder is creating- Parameters:
l
- the request listener that will receive notifications about request events- Returns:
- this
DefaultVOMSACService.Builder
instance
-
serverInfoStoreListener
Sets theVOMSServerInfoStoreListener
for theDefaultVOMSACService
that this builder is creating- Parameters:
sl
- the store listener that will receive notifications about store events- Returns:
- this
DefaultVOMSACService.Builder
instance
-
serverInfoStore
Sets theVOMSServerInfoStore
for theDefaultVOMSACService
that this builder is creating- Parameters:
sis
- aVOMSServerInfoStore
object- Returns:
- this
DefaultVOMSACService.Builder
instance
-
protocolListener
Sets theVOMSProtocolListener
for theDefaultVOMSACService
that this builder is creating- Parameters:
pl
- theVOMSProtocolListener
that will receive notifications about protocol events- Returns:
- this
DefaultVOMSACService.Builder
instance
-
connectTimeout
Sets the connect timeout (in millisecods) for theDefaultVOMSACService
that this builder is creating- Parameters:
timeout
- the timeout value in milliseconds- Returns:
- this
DefaultVOMSACService.Builder
instance
-
readTimeout
Sets the read timeout (in milliseconds) for theDefaultVOMSACService
that this builder is creating- Parameters:
timeout
- the timeout value in milliseconds- Returns:
- this
DefaultVOMSACService.Builder
instance
-
skipHostnameChecks
Sets a flag to skip VOMS hostname checking. Allows for creative VOMS server side certificate configuration.- Parameters:
s
-true
to skip the checks,false
otherwise- Returns:
- this
DefaultVOMSACService.Builder
instance
-
vomsesLookupStrategy
Sets the vomses lookup strategy for theDefaultVOMSACService
that this builder is creating- Parameters:
strategy
- theVOMSESLookupStrategy
object- Returns:
- this
DefaultVOMSACService.Builder
instance
-
vomsesLocations
Sets a list of locations that will be used to build aVOMSESLookupStrategy
for theDefaultVOMSACService
that this builder is creating- Parameters:
vomsesLocations
- a list of paths where vomses information will be looked for- Returns:
- this
DefaultVOMSACService.Builder
instance
-
httpProtocol
Sets the http protocol implementation- Parameters:
httpProtocol
- the http protocol implementatino- Returns:
- this
DefaultVOMSACService.Builder
instance
-
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
-true
to enable the legacy protocol,false
otherwise- Returns:
- this
DefaultVOMSACService.Builder
instance
-
buildServerInfoStore
protected void buildServerInfoStore()Builds the server info store -
buildProtocols
protected void buildProtocols()Builds default protocols if needed -
build
Builds theDefaultVOMSACService
- Returns:
- a
DefaultVOMSACService
configured as required by this builder
-