Android message mechanism (Handler message transmission mechanism)
For the sake of performance optimization, android UI operations are not thread-safe, which means that if multiple threads operate on the UI component concurrently, thread security issues may occur and this problem is not solved,
From the perspective of development, Handler is the upper-layer interface of the Android
Original address: Http://www.cnblogs.com/codingmyworld/archive/2011/09/12/2174255.html#!commentsAs a junior preparatory programmer, one of my great pleasures in learning Android is that I can learn the design ideas of Google Daniel through the source code. Android source contains a large number of design patterns, in addition, the Android SDK also carefully designed for us a variety of helper classes, for me as eager as the level of the people who want to be advanced, it is worth reading. This i
A lot of people interviewed must have been asked, what is the relationship between Looper, Handler, and message in Android? The purpose of this blog is to introduce 3 relationships from the source point of view, and then give a conclusion that is easy to remember.1. Overview handler, Looper, and message all three concepts related to the Android asynchronous message
Message Profiling
As a child, we learned that stamps should be affixed to the upper right corner of the envelope, and the address should be in the middle. If we want, we can add a reply address in the upper left corner of the envelope. All processed letters must adhere to this basic structure. If the format is not correct, or the address is unclear, or the address is not valid, the postal service will consider the
] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/bus/refresh],methods=[POST]}" onto public void org.springframework.cloud.bus.endpoint.RefreshBusEndpoint.refresh(java.lang.String)Indicates that the client has the ability to notify the message bus, in order to better simulate the effect of the message bus, we change the client Spring-cloud-config-client project port to 8003, 8004 start, so the test enviro
For the Web HTTP programming model, the service contract as an operational method does not need to apply the OperationContractAttribute feature, only need to apply WebGetAttribute and WebInvokeAttribute features as needed. The former is for get HTTP methods, or for other HTTP methods. The properties of WebGetAttribute and WebInvokeAttribute bodystyle and isbodystylesetexplicitly are related to the topic "Web Message body style". 1: [AttributeUsage (
Android's message processing has three core classes: Looper,handler and message. There's actually a message queue, but MQ is encapsulated in Looper, and we don't deal directly with MQ, so I don't use it as a core class. Here are the following:Thread of the magician LooperLooper literally means "circulator", which is designed to make a normal thread into a looper
From: http://blog.sina.com.cn/s/blog_4b3c1f950100nten.html
1. Standard Messages (queue messages)
Except wm_command, all messages starting with WM _ are standard messages, such as wm_mousemove, wm_lbuttonup,
Wm_keydown and wm_char.
Classes derived from cwnd can receive such messages.
Every time windows removes a message from the system message queue, it determines which window it sends and which thread creat
The data may be transferred multiple times between the start of the TCP connection and the end of the connection, that is, the server and the client may transmit multiple messages to each other during the connection process. The ideal situation is that one message is sent to each party, and the other side immediately receives one, that is, a write corresponding to read at a time. However, reality does not always follow the script to go.Mina Official d
Android Instant Message Processing Mechanism and android Instant Message ProcessingHow to ensure instant messaging without consuming power when making instant messages on android. Why? The reason is that to ensure the instant messaging, there are usually two mechanisms pull or push. The pull regular polling mechanism is a waste of server resources. The push server needs to maintain persistent connections, a
An analysis of auxiliary function schemeWith regard to WX's various functional plug-ins have been very common, and now the plug-in is dependent on the xposed framework, so the personal feel that WX should be in this convenient to deal with the use of xposed framework protection, to prevent the phenomenon of plug-ins flying, This article describes a WX app that receives a message if it is an article link that automatically opens the Browse feature. Thi
SIP Message Type and Message format
SIP is a text-based protocol that uses the UTF-8 character set.
There are two main types of SIP messages:
One is the request sent from the client to the server );
One is the response message sent from the server to the client ).
A basic SIP message includes the starting line, one or
send an error message.Calledfromwrongthreadexception. When such an exception is thrown in the future, you must know how to handle it!2.2 Message QueueIn the single-thread model, Android designs a message queue to solve similar problems. The message queue can be used between threads to exchange information with handler and logoff components. They are described as
Event drive)
Events generate messages, and applications generate messages.
The operations on the DOS system are easy to understand, and a command is input to execute a series of actions. enter a command to input a function name and call it (sometimes a parameter is required ). in Windows, there are some graphic operation interfaces. what will happen after you click a mouse in the image area? First of all, you guess whether it will be done by clicking on the icon, that is, calling a function to d
Message Queue 1: Message QueueWhy Message Queue?
DecouplingIt is extremely difficult to predict the future needs of a project at the beginning of the project. An implicit data-based interface layer is inserted in the message queue during the processing process. Both interfaces must be implemented during the processin
Message ForwardingIn order for a class to understand a message, we must implement the corresponding method in code. However, at compile time, sending a message to the class that it cannot read does not give an error, because you can continue to add methods to the class at run time, so the compiler does not know in any way whether a method will be implemented in t
Android message processing has three core classes: logoff, handler, and message. There is also a message queue, but MQ is encapsulated into logoff, handler plays the role of adding and processing messages to MQ (only processing messages sent by itself), that is, notifying MQ that it wants to execute a task (sendmessage ), and execute the handlemessage when the lo
Thread message communication and asynchronous processing, and thread message AsynchronizationReprinted please indicate the source:
Http://blog.csdn.net/yujun411522/article/details/46444869This article is from: [yujun411522 blog]
The knowledge about message communication and handler in android has been briefly introduced in the previous Handler. Here we will intr
Message Queuing
Development language
Protocol support
Design Patterns
Persistent support
Transaction support
Load Balancing Support
Functional characteristics
Disadvantages
RabbitMQ
Erlang
Amqp,xmpp,smtp,stomp
Agent (Broker) mode (messages are queued in the central queue before they are sent to the client)
Support Persistence to File
Not supported
Support
The performance is good,
For non-window controls, that is, control is twincontrol = false and contol is tcontrol = true (inherited from the tcontorl class but not from the twincontrol class), The subclass of the tgraphiccontrol is not a window control, they do not have window handles. How do these controls generate onclick events? One of the key points to be explained is that non-window controls cannot respond to standard Windows messages. Window controls can interact with users and get mouse input because they can proc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.