private EclipseAppHandle createAppHandle(Map arguments) throws ApplicationException { EclipseAppHandle newAppHandle = new EclipseAppHandle(getInstanceID(), arguments, this); appContainer.lock(newAppHandle); ServiceRegistration appHandleReg = (ServiceRegistration) AccessController.doPrivileged(appContainer.getRegServiceAction(new String[] {ApplicationHandle.class.getName(), IApplicationContext.class.getName()}, newAppHandle, newAppHandle.getServiceProperties())); newAppHandle.setServiceRegistration(appHandleReg); return newAppHandle; }
private EclipseAppHandle createAppHandle(Map arguments) throws ApplicationException { EclipseAppHandle newAppHandle = new EclipseAppHandle(getInstanceID(), arguments, this); appContainer.lock(newAppHandle); ServiceRegistration appHandleReg = (ServiceRegistration) AccessController.doPrivileged(appContainer.getRegServiceAction(new String[] {ApplicationHandle.class.getName(), IApplicationContext.class.getName()}, newAppHandle, newAppHandle.getServiceProperties())); newAppHandle.setServiceRegistration(appHandleReg); return newAppHandle; }
private EclipseAppHandle createAppHandle(Map arguments) throws ApplicationException { EclipseAppHandle newAppHandle = new EclipseAppHandle(getInstanceID(), arguments, this); appContainer.lock(newAppHandle); ServiceRegistration appHandleReg = (ServiceRegistration) AccessController.doPrivileged(appContainer.getRegServiceAction(new String[] {ApplicationHandle.class.getName(), IApplicationContext.class.getName()}, newAppHandle, newAppHandle.getServiceProperties())); newAppHandle.setServiceRegistration(appHandleReg); return newAppHandle; }
private synchronized void setAppStatus(int status) { if (this.status == status) return; if ((status & EclipseAppHandle.FLAG_STARTING) != 0) throw new IllegalArgumentException("Cannot set app status to starting"); //$NON-NLS-1$ // if status is stopping and the context is already stopping then return if ((status & EclipseAppHandle.FLAG_STOPPING) != 0) if ((this.status & (EclipseAppHandle.FLAG_STOPPING | EclipseAppHandle.FLAG_STOPPED)) != 0) return; // change the service properties to reflect the state change. this.status = status; ServiceRegistration handleReg = getServiceRegistration(); if (handleReg == null) return; handleReg.setProperties(getServiceProperties()); // if the status is stopped then unregister the service if ((this.status & EclipseAppHandle.FLAG_STOPPED) != 0) { ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().unlock(this); handleReg.unregister(); setServiceRegistration(null); } }
private synchronized void setAppStatus(int status) { if (this.status == status) return; if ((status & EclipseAppHandle.FLAG_STARTING) != 0) throw new IllegalArgumentException("Cannot set app status to starting"); //$NON-NLS-1$ // if status is stopping and the context is already stopping then return if ((status & EclipseAppHandle.FLAG_STOPPING) != 0) if ((this.status & (EclipseAppHandle.FLAG_STOPPING | EclipseAppHandle.FLAG_STOPPED)) != 0) return; // change the service properties to reflect the state change. this.status = status; ServiceRegistration handleReg = getServiceRegistration(); if (handleReg == null) return; handleReg.setProperties(getServiceProperties()); // if the status is stopped then unregister the service if ((this.status & EclipseAppHandle.FLAG_STOPPED) != 0) { ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().unlock(this); handleReg.unregister(); setServiceRegistration(null); } }
private synchronized void setAppStatus(int status) { if (this.status == status) return; if ((status & EclipseAppHandle.FLAG_STARTING) != 0) throw new IllegalArgumentException("Cannot set app status to starting"); //$NON-NLS-1$ // if status is stopping and the context is already stopping then return if ((status & EclipseAppHandle.FLAG_STOPPING) != 0) if ((this.status & (EclipseAppHandle.FLAG_STOPPING | EclipseAppHandle.FLAG_STOPPED)) != 0) return; // change the service properties to reflect the state change. this.status = status; ServiceRegistration handleReg = getServiceRegistration(); if (handleReg == null) return; handleReg.setProperties(getServiceProperties()); // if the status is stopped then unregister the service if ((this.status & EclipseAppHandle.FLAG_STOPPED) != 0) { ((EclipseAppDescriptor) getApplicationDescriptor()).getContainerManager().unlock(this); handleReg.unregister(); setServiceRegistration(null); } }