1 18 19 package org.osgi.framework; 20 21 import java.util.EventObject ; 22 23 39 40 public class FrameworkEvent extends EventObject { 41 static final long serialVersionUID = 207051004521261705L; 42 45 private final Bundle bundle; 46 47 50 private final Throwable throwable; 51 52 55 private final int type; 56 57 70 public final static int STARTED = 0x00000001; 71 72 81 public final static int ERROR = 0x00000002; 82 83 96 public final static int PACKAGES_REFRESHED = 0x00000004; 97 98 111 public final static int STARTLEVEL_CHANGED = 0x00000008; 112 113 124 public final static int WARNING = 0x00000010; 125 126 137 public final static int INFO = 0x00000020; 138 139 148 public FrameworkEvent(int type, Object source) { 149 super(source); 150 this.type = type; 151 this.bundle = null; 152 this.throwable = null; 153 } 154 155 163 public FrameworkEvent(int type, Bundle bundle, Throwable throwable) { 164 super(bundle); 165 this.type = type; 166 this.bundle = bundle; 167 this.throwable = throwable; 168 } 169 170 175 public Throwable getThrowable() { 176 return throwable; 177 } 178 179 185 public Bundle getBundle() { 186 return bundle; 187 } 188 189 204 205 public int getType() { 206 return type; 207 } 208 } 209 | Popular Tags |