Tel: +86-755-33925289
Home > News > Content
Product Categories
Add: No.3, Tianyang 4th Road, Datianyang Industrial Area, Songgang Town, Baoan District, Shenzhen City, China
Tel: +86-755-33925289
Fax: +86-755-33925292
Mob: +8613128892605
Contacts: Hikin
Email: hikinsong@foxmail.com

Adapter A Separate Hardware Interface Device

Edit:Shenzhen GEO Technology Co.,Ltd   Date:Sep 22, 2017

The adapter is English translation of the Adapter / adaptor. Adapter is an interface converter, it can be a separate hardware interface device, allowing hardware or electronic interface with other hardware or electronic interface can also be information interface. For example: power adapter, tripod base adapter parts, USB and serial port transfer equipment.

In a computer, the adapter is usually built into a card that can be plugged into a slot on the motherboard (and also an external) card to exchange information between the adapter and the device supported by the processor and the adapter. Power adapter is a small portable electronic equipment and electrical and electronic power supply conversion equipment, generally by the shell, power transformers and rectifier circuit, according to its output type can be divided into AC output and DC output type; according to the connection can be divided into wall Type and desktop. Mobile PC because there is no battery, power adapter is particularly important to it.

Most mobile PC power adapter can automatically detect 100 ~ 240V AC (50 / 60Hz). Basically all the mobile PC power supply external, with a line and the host connection, which can reduce the size and weight of the host, only a very small number of models built-in power in the host. In the power adapter has a nameplate, marked above the power, input and output voltage and current and other indicators, with particular attention to the input voltage range, which is the so-called "travel power adapter."

When the MBean is registered to the MBean server, the protocols that interact with these MBeans are required and the information is retrieved for requests from the management application. This is enabled through the protocol adapter, which converts the management application data into standard protocol information.

Multiprotocol Agent supports protocol adapters including: SNMP, TL1, RMI, CORBA, HTTP, and HTML adapters.

In the actual development process, we often encounter such a thing, we according to the initial needs of the development of a base class, in the development process to understand the detailed needs or demand has changed. And the development of the interface has long been defined in the interface, and has been large-scale coding. At this point if the definition of changes in the interface will cause a lot of coding on the repetitive modification work, and thus may cause incomplete changes caused by semantic errors or logic errors. Semantic errors can still be found in the compilation phase, and in the event of a logical error, the consequences will be very serious, even enough to cause the system to crash. At this point you need to use the adapter model design method.

In computer programming, the adapter pattern (sometimes called the wrapper style or wrapper) adapts a class of interfaces to what the user expects. An adaptation allows classes that are usually not compatible with the interface and can not work together, by wrapping their own interfaces in an existing class.

Adapter mode is mainly used when the interface defined in the method can not meet the needs of customers, or interface to define the method name or method interface and customer needs conflict situation.

How to use the adapter mode:

Using a class to inherit the interface and the known class at the same time, use the methods and properties defined in the known class to implement the definition of the interface (mainly using the method of overloading the interface method). Use this class as the base class for other business classes, that is, this class fits the interface and the known class. If the known class changes, just modify the class adapter, you can meet the interface implementation.