00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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 }