Foxit PDF SDK
com.foxit.sdk.pdf.TimeStampServerMgr类 参考

Public 成员函数

synchronized void delete ()
 直接清除C++相关资源。 更多...
 

静态 Public 成员函数

static TimeStampServer addServer (String server_name, String server_url, String user_name, String password) throws com.foxit.sdk.PDFException
 向管理器添加时间戳服务器。
更多...
 
static TimeStampServer getDefaultServer () throws com.foxit.sdk.PDFException
 获取默认时间戳服务器对象。
更多...
 
static TimeStampServer getServer (int index) throws com.foxit.sdk.PDFException
 使用指定索引获取时间戳服务器。
更多...
 
static int getServerCount () throws com.foxit.sdk.PDFException
 获取时间戳服务器数量。
更多...
 
static int getServerIndex (TimeStampServer server) throws com.foxit.sdk.PDFException
 获取指定时间戳服务器对象的索引。
更多...
 
static int initialize ()
 初始化时间戳服务器管理器。
更多...
 
static void release ()
 释放时间戳服务器管理器。
更多...
 
static void removeServer (int index) throws com.foxit.sdk.PDFException
 通过索引从管理器中移除时间戳服务器。
更多...
 
static void removeServer (TimeStampServer server) throws com.foxit.sdk.PDFException
 通过时间戳服务器对象从管理器中移除时间戳服务器。
更多...
 
static void setDefaultServer (int index) throws com.foxit.sdk.PDFException
 通过索引设置默认时间戳服务器对象。
更多...
 
static void setDefaultServer (TimeStampServer server) throws com.foxit.sdk.PDFException
 通过时间戳服务器对象设置默认时间戳服务器。
更多...
 

详细描述

时间戳服务器管理器用于管理一些时间戳服务器。此管理器中的默认时间戳服务器将 在过滤器"Adobe.PPKLite"与子过滤器"ETSI.CAdES.detached"以及 过滤器"Adobe.PPKLite"与子过滤器"ETSI.RFC3161"的默认签名回调中使用。因此在使用Foxit PDF SDK中的默认签名回调 对这些过滤器-子过滤器对的签名进行签名或验证之前,请确保通过 Library.setTimeStampCallback 设置了有效的com.foxit.sdk.pdf.TimeStampCallback 对象, 或者时间戳服务器管理器已初始化并设置了默认服务器,如果两者都设置了,Foxit PDF SDK将使用com.foxit.sdk.pdf.TimeStampCallback

成员函数说明

◆ addServer()

static TimeStampServer com.foxit.sdk.pdf.TimeStampServerMgr.addServer ( String  server_name,
String  server_url,
String  user_name,
String  password 
) throws com.foxit.sdk.PDFException
static

向管理器添加时间戳服务器。

参数
[in]server_name时间戳服务器名称。不应为空字符串。
[in]server_url时间戳服务器URL。不应为空字符串。
[in]user_name时间戳服务器的用户名。如果不需要,请传递空字符串。
[in]password时间戳服务器的密码。如果不需要,请传递空字符串。
返回
新添加的时间戳服务器对象。

◆ delete()

synchronized void com.foxit.sdk.pdf.TimeStampServerMgr.delete ( )

直接清除C++相关资源。

返回
无。
注解
一旦这个接口被调用,这个对象将不能再被使用。

◆ getDefaultServer()

static TimeStampServer com.foxit.sdk.pdf.TimeStampServerMgr.getDefaultServer ( ) throws com.foxit.sdk.PDFException
static

获取默认时间戳服务器对象。

返回
作为默认的时间戳服务器对象。

◆ getServer()

static TimeStampServer com.foxit.sdk.pdf.TimeStampServerMgr.getServer ( int  index) throws com.foxit.sdk.PDFException
static

使用指定索引获取时间戳服务器。

参数
[in]index时间戳服务器索引。有效范围:从0到(count-1)。 count由函数TimeStampServerMgr.getServerCount 返回。
返回
时间戳服务器对象。

◆ getServerCount()

static int com.foxit.sdk.pdf.TimeStampServerMgr.getServerCount ( ) throws com.foxit.sdk.PDFException
static

获取时间戳服务器数量。

返回
服务器数量。

◆ getServerIndex()

static int com.foxit.sdk.pdf.TimeStampServerMgr.getServerIndex ( TimeStampServer  server) throws com.foxit.sdk.PDFException
static

获取指定时间戳服务器对象的索引。

参数
[in]server时间戳服务器对象。
返回
指定时间戳服务器对象的索引。

◆ initialize()

static int com.foxit.sdk.pdf.TimeStampServerMgr.initialize ( )
static

初始化时间戳服务器管理器。

在可以调用TimeStampServerMgr 中的任何其他函数之前,应首先调用此函数。

返回
com.foxit.sdk.common.Constants.e_ErrSuccess 表示成功。
有关错误代码值的更多信息,请参阅从com.foxit.sdk.common.Constants.e_ErrSuccess 开始的值。

◆ release()

static void com.foxit.sdk.pdf.TimeStampServerMgr.release ( )
static

释放时间戳服务器管理器。

用户可以调用此函数在不再需要使用时间戳服务器管理器时释放它。 调用此函数后,如果用户想再次使用时间戳服务器管理器,请再次调用函数 TimeStampServerMgr.initialize

返回
None.

◆ removeServer() [1/2]

static void com.foxit.sdk.pdf.TimeStampServerMgr.removeServer ( int  index) throws com.foxit.sdk.PDFException
static

通过索引从管理器中移除时间戳服务器。

参数
[in]index要从管理器中移除的时间戳服务器的索引。
返回
None.

◆ removeServer() [2/2]

static void com.foxit.sdk.pdf.TimeStampServerMgr.removeServer ( TimeStampServer  server) throws com.foxit.sdk.PDFException
static

通过时间戳服务器对象从管理器中移除时间戳服务器。

参数
[in]server要从管理器中移除的时间戳服务器对象。 如果输入的服务器对象无效,此函数将不执行任何操作 并直接返回。
返回
None.

◆ setDefaultServer() [1/2]

static void com.foxit.sdk.pdf.TimeStampServerMgr.setDefaultServer ( int  index) throws com.foxit.sdk.PDFException
static

通过索引设置默认时间戳服务器对象。

参数
[in]index要设置为默认服务器的时间戳服务器索引。有效范围:从0到(count-1)。 count由函数TimeStampServerMgr.getServerCount 返回。
返回
None.

◆ setDefaultServer() [2/2]

static void com.foxit.sdk.pdf.TimeStampServerMgr.setDefaultServer ( TimeStampServer  server) throws com.foxit.sdk.PDFException
static

通过时间戳服务器对象设置默认时间戳服务器。

参数
[in]server要设置为默认服务器的时间戳服务器对象。 如果输入的服务器对象无效,此函数将抛出 异常com.foxit.sdk.common.Constants.e_ErrNotFound
返回
None.