public static class DefaultVOMSACService.Builder
extends java.lang.Object
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(); }
Modifier and Type | Field and Description |
---|---|
private int |
connectTimeout
The connect timeout value
|
protected VOMSProtocol |
httpProtocol
The http protocol implementation
|
protected VOMSProtocol |
legacyProtocol
The voms legacy protocol implementation
|
private VOMSProtocolListener |
protocolListener
The listener that will be informed about low-level protocol details
|
private int |
readTimeout
The read timeout used
|
private VOMSRequestListener |
requestListener
The listener that will be informed about request events
|
private VOMSServerInfoStore |
serverInfoStore
The store used to keep VOMS server contact information.
|
private boolean |
skipHostnameChecks
Whether the client should skip hostname checking
|
private VOMSServerInfoStoreListener |
storeListener
The listener that will be informed about server info store events
|
private eu.emi.security.authn.x509.X509CertChainValidatorExt |
validator
The validator used for the SSL handshake
|
private java.util.List<java.lang.String> |
vomsesLocations
A list of paths where vomses information will be looked for, used to
create the server info store.
|
private VOMSESLookupStrategy |
vomsesLookupStrategy
The provided strategy to lookup vomses information.
|
Constructor and Description |
---|
Builder(eu.emi.security.authn.x509.X509CertChainValidatorExt certChainValidator)
Creates a Builder for a
DefaultVOMSACService . |
Modifier and Type | Method and Description |
---|---|
DefaultVOMSACService |
build()
Builds the
DefaultVOMSACService |
protected void |
buildProtocols()
Builds default protocols if needed
|
protected void |
buildServerInfoStore()
Builds the server info store
|
DefaultVOMSACService.Builder |
connectTimeout(int timeout)
Sets the connect timeout (in millisecods) for the
DefaultVOMSACService that this builder is creating |
DefaultVOMSACService.Builder |
httpProtocol(VOMSProtocol httpProtocol)
Sets the http protocol implementation
|
DefaultVOMSACService.Builder |
legacyProtocol(VOMSProtocol legacyProtocol)
Sets the legacy protocol implementation
|
DefaultVOMSACService.Builder |
protocolListener(VOMSProtocolListener pl)
Sets the
VOMSProtocolListener for the
DefaultVOMSACService that this builder is creating |
DefaultVOMSACService.Builder |
readTimeout(int timeout)
Sets the read timeout (in milliseconds) for the
DefaultVOMSACService that this builder is creating |
DefaultVOMSACService.Builder |
requestListener(VOMSRequestListener l)
Sets the request listener for the
DefaultVOMSACService that this
builder is creating |
DefaultVOMSACService.Builder |
serverInfoStore(VOMSServerInfoStore sis)
Sets the
VOMSServerInfoStore for the DefaultVOMSACService
that this builder is creating |
DefaultVOMSACService.Builder |
serverInfoStoreListener(VOMSServerInfoStoreListener sl)
Sets the
VOMSServerInfoStoreListener for the
DefaultVOMSACService that this builder is creating |
DefaultVOMSACService.Builder |
skipHostnameChecks(boolean s)
Sets a flag to skip VOMS hostname checking.
|
DefaultVOMSACService.Builder |
vomsesLocations(java.util.List<java.lang.String> vomsesLocations)
Sets a list of locations that will be used to build a
VOMSESLookupStrategy for the DefaultVOMSACService that
this builder is creating |
DefaultVOMSACService.Builder |
vomsesLookupStrategy(VOMSESLookupStrategy strategy)
Sets the vomses lookup strategy for the
DefaultVOMSACService that
this builder is creating |
private VOMSRequestListener requestListener
private VOMSProtocolListener protocolListener
private VOMSServerInfoStoreListener storeListener
private eu.emi.security.authn.x509.X509CertChainValidatorExt validator
private VOMSServerInfoStore serverInfoStore
private VOMSESLookupStrategy vomsesLookupStrategy
private java.util.List<java.lang.String> vomsesLocations
private int connectTimeout
private int readTimeout
private boolean skipHostnameChecks
protected VOMSProtocol httpProtocol
protected VOMSProtocol legacyProtocol
public Builder(eu.emi.security.authn.x509.X509CertChainValidatorExt certChainValidator)
DefaultVOMSACService
.certChainValidator
- the validator to use to setup the SSL connection and validate
the certificatespublic DefaultVOMSACService.Builder requestListener(VOMSRequestListener l)
DefaultVOMSACService
that this
builder is creatingl
- the request listener that will receive notifications about
request eventsDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder serverInfoStoreListener(VOMSServerInfoStoreListener sl)
VOMSServerInfoStoreListener
for the
DefaultVOMSACService
that this builder is creatingsl
- the store listener that will receive notifications about store
eventsDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder serverInfoStore(VOMSServerInfoStore sis)
VOMSServerInfoStore
for the DefaultVOMSACService
that this builder is creatingsis
- a VOMSServerInfoStore
objectDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder protocolListener(VOMSProtocolListener pl)
VOMSProtocolListener
for the
DefaultVOMSACService
that this builder is creatingpl
- the VOMSProtocolListener
that will receive notifications
about protocol eventsDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder connectTimeout(int timeout)
DefaultVOMSACService
that this builder is creatingtimeout
- the timeout value in millisecondsDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder readTimeout(int timeout)
DefaultVOMSACService
that this builder is creatingtimeout
- the timeout value in millisecondsDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder skipHostnameChecks(boolean s)
s
- true
to skip the checks, false
otherwiseDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder vomsesLookupStrategy(VOMSESLookupStrategy strategy)
DefaultVOMSACService
that
this builder is creatingstrategy
- the VOMSESLookupStrategy
objectDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder vomsesLocations(java.util.List<java.lang.String> vomsesLocations)
VOMSESLookupStrategy
for the DefaultVOMSACService
that
this builder is creatingvomsesLocations
- a list of paths where vomses information will be looked forDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder httpProtocol(VOMSProtocol httpProtocol)
httpProtocol
- the http protocol implementatinoDefaultVOMSACService.Builder
instancepublic DefaultVOMSACService.Builder legacyProtocol(VOMSProtocol legacyProtocol)
legacyProtocol
- the legacy protocol implementationDefaultVOMSACService.Builder
protected void buildServerInfoStore()
protected void buildProtocols()
public DefaultVOMSACService build()
DefaultVOMSACService
DefaultVOMSACService
configured as required by this
builder