Android Open Source - Android-ORM Handler






From Project

Back to project page Android-ORM.

License

The source code is released under:

Apache License

If you think the Android project Android-ORM listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright (C) 2006 The Android Open Source Project
 */*from   w w w  .j  a v a2 s  .com*/
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.os;

/**
 * A Handler allows you to send and process {@link Message} and Runnable objects
 * associated with a thread's {@link MessageQueue}. Each Handler instance is
 * associated with a single thread and that thread's message queue. When you
 * create a new Handler, it is bound to the thread / message queue of the thread
 * that is creating it -- from that point on, it will deliver messages and
 * runnables to that message queue and execute them as they come out of the
 * message queue.
 * 
 * <p>
 * There are two main uses for a Handler: (1) to schedule messages and runnables
 * to be executed as some point in the future; and (2) to enqueue an action to
 * be performed on a different thread than your own.
 * 
 * <p>
 * Scheduling messages is accomplished with the {@link #post},
 * {@link #postAtTime(Runnable, long)}, {@link #postDelayed},
 * {@link #sendEmptyMessage}, {@link #sendMessage}, {@link #sendMessageAtTime},
 * and {@link #sendMessageDelayed} methods. The <em>post</em> versions allow you
 * to enqueue Runnable objects to be called by the message queue when they are
 * received; the <em>sendMessage</em> versions allow you to enqueue a
 * {@link Message} object containing a bundle of data that will be processed by
 * the Handler's {@link #handleMessage} method (requiring that you implement a
 * subclass of Handler).
 * 
 * <p>
 * When posting or sending to a Handler, you can either allow the item to be
 * processed as soon as the message queue is ready to do so, or specify a delay
 * before it gets processed or absolute time for it to be processed. The latter
 * two allow you to implement timeouts, ticks, and other timing-based behavior.
 * 
 * <p>
 * When a process is created for your application, its main thread is dedicated
 * to running a message queue that takes care of managing the top-level
 * application objects (activities, broadcast receivers, etc) and any windows
 * they create. You can create your own threads, and communicate back with the
 * main application thread through a Handler. This is done by calling the same
 * <em>post</em> or <em>sendMessage</em> methods as before, but from your new
 * thread. The given Runnable or Message will then be scheduled in the Handler's
 * message queue and processed when appropriate.
 */
public class Handler {
    
}




Java Source Code List

android.content.ContentResolver.java
android.content.ContentValues.java
android.database.ContentObserver.java
android.database.Cursor.java
android.database.sqlite.SQLiteDatabase.java
android.database.sqlite.SQLiteOpenHelper.java
android.net.Uri.java
android.os.Handler.java
android.util.FastPrintWriter.java
android.util.Log.java
android.util.Printer.java
cn.ieclipse.aorm.Aorm.java
cn.ieclipse.aorm.Criteria.java
cn.ieclipse.aorm.CursorUtils.java
cn.ieclipse.aorm.Mapping.java
cn.ieclipse.aorm.ORMException.java
cn.ieclipse.aorm.Order.java
cn.ieclipse.aorm.Restrictions.java
cn.ieclipse.aorm.SessionObserver.java
cn.ieclipse.aorm.Session.java
cn.ieclipse.aorm.annotation.ColumnWrap.java
cn.ieclipse.aorm.annotation.Column.java
cn.ieclipse.aorm.annotation.TableWrap.java
cn.ieclipse.aorm.annotation.Table.java
cn.ieclipse.aorm.example.AbstractBaseAdapter.java
cn.ieclipse.aorm.example.BaseActivity.java
cn.ieclipse.aorm.example.CourseDetailActivity.java
cn.ieclipse.aorm.example.CourseListActivity.java
cn.ieclipse.aorm.example.DetailActivity.java
cn.ieclipse.aorm.example.ExampleApplication.java
cn.ieclipse.aorm.example.ExampleContentProvider.java
cn.ieclipse.aorm.example.ListActivity.java
cn.ieclipse.aorm.example.MainActivity.java
cn.ieclipse.aorm.example.StudentDetailActivity.java
cn.ieclipse.aorm.example.StudentGradeActivity.java
cn.ieclipse.aorm.example.StudentGradeDetailActivity.java
cn.ieclipse.aorm.example.StudentListActivity.java
cn.ieclipse.aorm.example.bean.Course.java
cn.ieclipse.aorm.example.bean.Grade.java
cn.ieclipse.aorm.example.bean.Student.java