FrameworkEvent.java

00001 /*
00002  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/FrameworkEvent.java,v 1.14 2006/06/16 16:31:18 hargrave Exp $
00003  * 
00004  * Copyright (c) OSGi Alliance (2004, 2006). All Rights Reserved.
00005  * 
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 
00019 package org.osgi.framework;
00020 
00021 import java.util.EventObject;
00022 
00037 public class FrameworkEvent extends EventObject {
00038         static final long               serialVersionUID        = 207051004521261705L;
00042         private Bundle                  bundle;
00043 
00047         private Throwable               throwable;
00048 
00052         private int                             type;
00053 
00067         public final static int STARTED                         = 0x00000001;
00068 
00078         public final static int ERROR                           = 0x00000002;
00079 
00094         public final static int PACKAGES_REFRESHED      = 0x00000004;
00095 
00110         public final static int STARTLEVEL_CHANGED      = 0x00000008;
00111 
00123         public final static int WARNING                         = 0x00000010;
00124 
00136         public final static int INFO                            = 0x00000020;
00137 
00147         public FrameworkEvent(int type, Object source) {
00148                 super(source);
00149                 this.type = type;
00150                 this.bundle = null;
00151                 this.throwable = null;
00152         }
00153 
00162         public FrameworkEvent(int type, Bundle bundle, Throwable throwable) {
00163                 super(bundle);
00164                 this.type = type;
00165                 this.bundle = bundle;
00166                 this.throwable = throwable;
00167         }
00168 
00174         public Throwable getThrowable() {
00175                 return throwable;
00176         }
00177 
00184         public Bundle getBundle() {
00185                 return bundle;
00186         }
00187 
00204         public int getType() {
00205                 return type;
00206         }
00207 }

Generated on Mon Jan 11 21:19:14 2010 for OpenMobileIS by  doxygen 1.5.4