如果您完全不愿意为适配器创建额外的类,那么应该怎么办呢?
What if you didn't want to create an extra class at all for your adapter?
这是一个典型的资源适配器类。
创建一个使用适配器的服务,包括创建一个使用服务描述符(代表SOAP服务)的服务类。
Creating a service using the adapter includes creating a service class with the service descriptor that represents the SOAP service.
这个框架是专利集成技术,它需要适配器开发者扩展并实现现有类及方法,组装成元数据驱动集成解决方法。
This framework is a proprietary integration technique that requires adapter developers to extend and implement existing classes and methods that assemble a metadata driven integration solution.
这种适配器层封装了使用存根及其生成的类的代码。
Such an adapter layer encapsulates code that uses the stub and its generated classes.
创建公有类和内容适配器变量。
工厂方法返回的类用于一个特定于服务的适配器。
The class returned by the factory method is an adapter to a particular cloud service.
一种可用的方案是创建适配器类。
图1显示了适配器模式的类图。
遗憾的是,构建这些适配器类是冗长的。
在门户框架中,您可以继承VaultAdapter类,从而开发一个到您自己的资源库的适配器接口。
You can extend the VaultAdapter class, in the portal framework, to develop an adapter interface to your own repository.
资源适配器可以在其部署描述符(ra . xml)的resourceadapter - class元素中给出实现这个接口的类的名称。
A resource adapter can give the name of a class implementing this interface in the resourceadapter-class element of its deployment descriptor (ra.xml).
GWT为鼠标事件、键盘事件、修改事件等提供了Listener接口,还提供了几个适配器和助手类,以获得更多方便。
GWT provides Listener interfaces for mouse events, keyboard events, change events, and so forth, as well as several adapter and helper classes for added convenience.
最终的结果是一个高度轻量级的适配器类,它实现了RoundThing接口所需的功能。
The end result is an extremely lightweight adapter class that implements the functionality required by the RoundThing interface.
jar由资源适配器提供;只用来运行execute类。
Ctgserver.jar Supplied by resource adapter; only to run Execute class.
jar由资源适配器提供;只用来运行execute类。
Ctgclient.jar Supplied by resource adapter; only to run Execute class.
正如在前面一节看到的,资源适配器支持的每个mdb接口都给出实现ActivationSpec接口的类的名称,如清单8所示。
As you saw in the previous section, each MDB interface that a resource adapter supports gives the name of a class implementing the ActivationSpec interface, shown in Listing 8.
默认的com . ibm . ws . rsadapter . cci . wsrelationalraadapter类是WebSphere提供的关系JCA资源适配器实现。
The default com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter class is the WebSphere-provided relational JCA resource adapter implementation.
适配器存档文件包含以下类。
因此用户不再需要应付listener适配器类。
As a result users no longer have to deal with listener adapter classes.
ComposedAdapterFactory类是另一个EMF. Edit便利类,用作其他适配器工厂的通用接口。
The ComposedAdapterFactory class is another one of the EMF.Edit convenience classes that ACTS as the common interface to other adapter factories.
我们即将了解到,这个类的优势在于,导航器只需将我们所需要的模型类型的项目提供程序作为组合适配器工厂的一部分包括进来。
The advantage of this, as we will see later, is that our navigator only needs to include the item providers for the model types we are interested in as part of the composed adapter factory.
因此,需要创建的内容提供程序类和标签提供程序类应为emf编辑框架中适配器工厂的子类。
Therefore, we need to create our content and label-provider classes as subclasses of the adapter factories from the EMF edit framework.
糟糕的是,与序列化对象对应的类是J2EE程序程序的一部分,因此该类位于应用程序的类路径中,而不是位于资源适配器的类路径中。
Unfortunately, the class corresponding to the serialized object is part of the J2EE application and is therefore on the application's classpath, not the resource adapter's.
在需要将一类对象转换成另一类对象时,请使用适配器模式。
Use the adapter pattern when you need to convert an object of one type to an object of another type.
实现IAdaptable接口的类能够动态地返回某些类型的适配器,然后可以使用这些适配器获取更多信息。
A class that implements IAdaptable has the capability to dynamically return certain types of adapters that can then be used to retrieve further information.
为了得到最好的适配器灵活性与可扩展性,适配器的总体类结构均通过使用下列设计模式的组合来构建
To achieve the maximum level of flexibility and extensibility for the adapter, the overall class structure of the adapter is constructed by using a composition of the following design patterns
适配器的公共api并不公开任何存根类;而是将其映射到Web服务消费者应用可以理解的类。
The public API of the adapter does not expose any of the stub classes; it instead maps them to classes that the Web service consumer application understands.
可以使用工作负荷管理事务类映射XML文件配置z/OS 工作负荷管理服务类,在该类下调度优化的本地适配器EJB请求。
The z/OS workload management service class, under which optimized local adapter EJB requests are dispatched, can be configured using the workload management transaction class mapping XML file.
可以使用工作负荷管理事务类映射XML文件配置z/OS 工作负荷管理服务类,在该类下调度优化的本地适配器EJB请求。
The z/OS workload management service class, under which optimized local adapter EJB requests are dispatched, can be configured using the workload management transaction class mapping XML file.
应用推荐