Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.fedict.eid.applet.service.signer.time
Class TSPTimeStampService

    java.lang.Object
      be.fedict.eid.applet.service.signer.time.TSPTimeStampService

All Implemented Interfaces:
  TimeStampService

    public class TSPTimeStampService

extends Object
implements TimeStampService

A TSP time-stamp service implementation.

Author:
  Frank Cornelis

Field Summary
`static String` | `DEFAULT_USER_AGENT`

Constructor Summary
`TSPTimeStampService(String tspServiceUrl, TimeStampServiceValidator validator)`
`TSPTimeStampService(String tspServiceUrl, TimeStampServiceValidator validator, String requestPolicy, String userAgent)` Main constructor.

Method Summary
`void` | `resetAuthenticationCredentials()` Resets the authentication credentials.
`void` | `resetProxy()` Resets the HTTP proxy settings.
`void` | `setAuthenticationCredentials(String username, String password)` Sets the credentials used in case the TSP service requires authentication.
`void` | `setDigestAlgo(String digestAlgo)` Sets the digest algorithm used for time-stamping data.
`void` | `setProxy(String proxyHost, int proxyPort)` Configures the HTTP proxy settings to be used to connect to the TSP service.
`void` | `setRequestPolicy(String policyOid)` Sets the request policy OID.
`byte[]` | `timeStamp(byte[] data, RevocationData revocationData)` Gives back the encoded time-stamp token for the given array of data bytes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_USER_AGENT

    public static final String DEFAULT_USER_AGENT

See Also:
  Constant Field Values

Constructor Detail

### TSPTimeStampService

    public TSPTimeStampService(String tspServiceUrl,
                               TimeStampServiceValidator validator)

### TSPTimeStampService

    public TSPTimeStampService(String tspServiceUrl,
                               TimeStampServiceValidator validator,
                               String requestPolicy,
                               String userAgent)

  Main constructor.

  Parameters:
    `tspServiceUrl` - the URL of the TSP service.
    `validator` - the trust validator used to validate incoming TSP response signatures.
    `requestPolicy` - the optional TSP request policy.
    `userAgent` - the optional User-Agent TSP request header value.

Method Detail

### setRequestPolicy

    public void setRequestPolicy(String policyOid)

  Sets the request policy OID.

  Parameters:
    `policyOid` -

### setAuthenticationCredentials

    public void setAuthenticationCredentials(String username,
                                             String password)

  Sets the credentials used in case the TSP service requires authentication.

  Parameters:
    `username` -
    `password` -

### resetAuthenticationCredentials

    public void resetAuthenticationCredentials()

  Resets the authentication credentials.

### setDigestAlgo

    public void setDigestAlgo(String digestAlgo)

  Sets the digest algorithm used for time-stamping data. Example value: "SHA-1".

  Parameters:
    `digestAlgo` -

### setProxy

    public void setProxy(String proxyHost,
                         int proxyPort)

  Configures the HTTP proxy settings to be used to connect to the TSP service.

  Parameters:
    `proxyHost` -
    `proxyPort` -

### resetProxy

    public void resetProxy()

  Resets the HTTP proxy settings.

### timeStamp

    public byte[] timeStamp(byte[] data,
                            RevocationData revocationData)
                     throws Exception

  Description copied from interface: `TimeStampService`
  Gives back the encoded time-stamp token for the given array of data bytes. We assume that the time-stamp token itself contains its full certificate chain required for proper validation.

  Specified by:
    `timeStamp` in interface `TimeStampService`
  Parameters:
    `data` - the data to be time-stamped.
    `revocationData` - the optional container that needs to be filled up with the revocation data used to validate the TSA certificate chain.
  Returns:
    the DER encoded time-stamp token.
  Throws:
    `Exception` - in case something went wrong.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2010 FedICT. All Rights Reserved.