org.italiangrid.voms.request.impl
Class AbstractVOMSProtocol

java.lang.Object
  extended by org.italiangrid.voms.request.impl.AbstractVOMSProtocol
All Implemented Interfaces:
VOMSProtocol
Direct Known Subclasses:
LegacyProtocol, RESTProtocol

public abstract class AbstractVOMSProtocol
extends Object
implements VOMSProtocol


Field Summary
protected  int connectTimeout
          The tcp connection timeout (in milliseconds)
static int DEFAULT_CONNECT_TIMEOUT
          The default value for the socket connection timeout
static int DEFAULT_READ_TIMEOUT
          The default value for the socket read timeout
protected  VOMSProtocolListener listener
           
protected  int readTimeout
          The socket read timeout (in milliseconds)
protected  eu.emi.security.authn.x509.X509CertChainValidatorExt validator
          The CAnL validator used to manage SSL authentication.
static String[] VOMS_LEGACY_PROTOCOLS
           
 
Constructor Summary
AbstractVOMSProtocol(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
 int getConnectTimeout()
           
 int getReadTimeout()
           
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 this AbstractVOMSProtocol
 void setConnectTimeout(int connectTimeout)
          Sets the connection timeout value for the underlying socket of this AbstractVOMSProtocol
 void setReadTimeout(int readTimeout)
          Sets the read timeout value for the underlying socket
 
Methods 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 Detail

VOMS_LEGACY_PROTOCOLS

public static final String[] VOMS_LEGACY_PROTOCOLS

DEFAULT_CONNECT_TIMEOUT

public static final int DEFAULT_CONNECT_TIMEOUT
The default value for the socket connection timeout

See Also:
Constant Field Values

DEFAULT_READ_TIMEOUT

public static final int DEFAULT_READ_TIMEOUT
The default value for the socket read timeout

See Also:
Constant Field Values

listener

protected VOMSProtocolListener listener

validator

protected eu.emi.security.authn.x509.X509CertChainValidatorExt validator
The CAnL validator used to manage SSL authentication.


connectTimeout

protected int connectTimeout
The tcp connection timeout (in milliseconds)


readTimeout

protected int readTimeout
The socket read timeout (in milliseconds)

Constructor Detail

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:
vomsServerInfo - the info for the remote VOMS server endpoint
validator - the validator used to manage the SSL authentication
listener - the listener informed of low-level protocol details
connectTimeout - sets the socket connection timeout
readTimeout - sets the socket read timeout
Method Detail

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 this AbstractVOMSProtocol

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 this AbstractVOMSProtocol

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


Copyright © 2013. All Rights Reserved.