Class AbstractVOMSProtocol
java.lang.Object
org.italiangrid.voms.request.impl.AbstractVOMSProtocol
- All Implemented Interfaces:
VOMSProtocol
- Direct Known Subclasses:
LegacyProtocol
,RESTProtocol
Base implementation class for the VOMS client/server protocol
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The tcp connection timeout (in milliseconds)static final int
The default value for the socket connection timeoutstatic final int
The default value for the socket read timeoutstatic final boolean
The default hostname checking policy.protected VOMSProtocolListener
protected int
The socket read timeout (in milliseconds)protected boolean
Whether to skip hostname checksprotected eu.emi.security.authn.x509.X509CertChainValidatorExt
The CAnL validator used to manage SSL authentication.static final String[]
Enabled TLS protocols for VOMS legacy connections. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractVOMSProtocol
(eu.emi.security.authn.x509.X509CertChainValidatorExt validator) Ctor.AbstractVOMSProtocol
(eu.emi.security.authn.x509.X509CertChainValidatorExt validator, VOMSProtocolListener listener, int connectTimeout, int readTimeout) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionint
int
protected SSLSocketFactory
getSSLSocketFactory
(eu.emi.security.authn.x509.X509Credential credential) Builds an SSL socket factory based on the credential passed as argument and the validator configured for thisAbstractVOMSProtocol
boolean
void
setConnectTimeout
(int connectTimeout) Sets the connection timeout value for the underlying socket of thisAbstractVOMSProtocol
void
setReadTimeout
(int readTimeout) Sets the read timeout value for the underlying socketvoid
setSkipHostnameChecks
(boolean skipHostnameChecks) Sets whether this protocol will skip SSL hostname checksMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.italiangrid.voms.request.VOMSProtocol
doRequest
-
Field Details
-
VOMS_LEGACY_ENABLED_PROTOCOLS
Enabled TLS protocols for VOMS legacy connections. -
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUTThe default value for the socket connection timeout- See Also:
-
DEFAULT_READ_TIMEOUT
public static final int DEFAULT_READ_TIMEOUTThe default value for the socket read timeout- See Also:
-
DEFAULT_SKIP_HOSTNAME_CHECKS
public static final boolean DEFAULT_SKIP_HOSTNAME_CHECKSThe default hostname checking policy.- See Also:
-
listener
-
validator
protected eu.emi.security.authn.x509.X509CertChainValidatorExt validatorThe CAnL validator used to manage SSL authentication. -
connectTimeout
protected int connectTimeoutThe tcp connection timeout (in milliseconds) -
readTimeout
protected int readTimeoutThe socket read timeout (in milliseconds) -
skipHostnameChecks
protected boolean skipHostnameChecksWhether to skip hostname checks
-
-
Constructor Details
-
AbstractVOMSProtocol
public AbstractVOMSProtocol(eu.emi.security.authn.x509.X509CertChainValidatorExt validator) Ctor.- Parameters:
validator
- the validator used to manage the SSL authentication
-
AbstractVOMSProtocol
public AbstractVOMSProtocol(eu.emi.security.authn.x509.X509CertChainValidatorExt validator, VOMSProtocolListener listener, int connectTimeout, int readTimeout) Ctor.- Parameters:
validator
- the validator used to manage the SSL authenticationlistener
- the listener informed of low-level protocol detailsconnectTimeout
- sets the socket connection timeoutreadTimeout
- sets the socket read timeout
-
-
Method Details
-
getSSLSocketFactory
protected SSLSocketFactory getSSLSocketFactory(eu.emi.security.authn.x509.X509Credential credential) Builds an SSL socket factory based on the credential passed as argument and the validator configured for thisAbstractVOMSProtocol
- Parameters:
credential
- the client credential used for the socket factory being created- Returns:
- an
SSLSocketFactory
-
getConnectTimeout
public int getConnectTimeout()- Returns:
- The connect timeout value (in milliseconds)
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout) Sets the connection timeout value for the underlying socket of thisAbstractVOMSProtocol
- Parameters:
connectTimeout
- the connection timeout in milliseconds
-
getReadTimeout
public int getReadTimeout()- Returns:
- the read timeout value (in milliseconds)
-
setReadTimeout
public void setReadTimeout(int readTimeout) Sets the read timeout value for the underlying socket- Parameters:
readTimeout
- the read timeout in milliseconds
-
isSkipHostnameChecks
public boolean isSkipHostnameChecks()- Returns:
- whether this protocol will skip hostname checks
-
setSkipHostnameChecks
public void setSkipHostnameChecks(boolean skipHostnameChecks) Sets whether this protocol will skip SSL hostname checks- Parameters:
skipHostnameChecks
- flag that defines whether hostname checks should be skipped for this protocol
-