2013年9月9日星期一

Hose adapter


Hose adapter is an interface converter , it can be a separate hardware interface device that allows hardware or electronic interface with other hardware or electronic interface is connected , it can be information interfaces . For example : power adapter, tripod adapter base component , USB and serial port adapter equipment.

In the computer, the adapter can be inserted typically available in the card slot on the motherboard (also external ) ... card adaptation information processor and adapter supports exchange between devices .

The power adapter is small portable electronic devices and electronic and electronic power conversion equipment , usually by the shell, power transformer and rectifier circuit, its output can be divided into AC output and DC- output type ; press connection can be inserted into the wall mount and desktop . Mobile PC because there is no battery, power adapter it is particularly important.

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

When MBean registered in the MBean server, you need to interoperate with these MBean agreement and from the management application to retrieve information requests . This is enabled by the protocol adapter , it will manage application data to a standard protocol message.

Multi-protocol proxy support protocol adapters include : SNMP, TL1, RMI, CORBA, HTTP and HTML adapter.

In the actual development process, we often encounter such a thing, we need to develop according to a preliminary base class , learned of the development process detailed requirements or needs have changed. The development work interfaces already defined, and has been put into mass encoding . If you change the definition of the interface at this time will cause a lot of repetitive coding modification work , and thus may result in modification of an incomplete semantic errors or logic errors. Semantic errors can still find at compile time , and in the event of logical errors , the consequences will be very serious , even enough to cause the system to crash. At this point you need to use the Adapter pattern design.

In computer programming , the adapter pattern ( sometimes also known as package styles or packaging ) will be a class interface adapted to the user is looking for. An adapter allows usually because of incompatible interfaces can not work together, work together in a class , the class approach is wrapped in its own interface to an existing class.

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

Adapter mode to use:

With a class inherits both interfaces and classes are known , using the known class defines metric banjo fitting the methods and properties , etc. , to achieve the interface definition ( the main advantage of the overloaded interface method approach ) . The use of such other business as the base class , which is the adaptation of the interface and the class known classes. If known class changes, simply modify the class adapter , to meet the interface.

没有评论:

发表评论