要添加新的适配器,必须在 instance_name.xml 配置文件中手工将它添加到适配器组。要添加新的适配器,请执行以下操作:
- 打开 instance_name.xml 配置文件。
定位 HttpAdapters XML 节点,并添加与以下类似的 XML 语法以定义适配器:
<HttpAdapter enabled="true/false" deviceFormatType="--device format--" deviceFormatId="#" name="--name--" factoryClassname="-- class implementing HttpAdapterFactory --">
< --- free range format of XML to contain adapter configuration information -->
注意:上一个示例将用于添加程序适配器。要添加不同类型的适配器,请相应地修改类实现。在此示例中,HttpAdapterFactory 是类实现。