use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class AbstractCDKLaunchController method processTerminated.
private void processTerminated(IServer server, IProcess p, IDebugEventSetListener listener) {
final ControllableServerBehavior beh = (ControllableServerBehavior) JBossServerBehaviorUtils.getControllableBehavior(server);
new Thread() {
@Override
public void run() {
handleProcessTerminated(p, beh);
}
}.start();
if (listener != null) {
DebugPlugin.getDefault().removeDebugEventListener(listener);
}
}
use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class AbstractCDKShutdownController method processTerminated.
private void processTerminated(IServer server, IDebugEventSetListener listener) {
final ControllableServerBehavior beh = (ControllableServerBehavior) JBossServerBehaviorUtils.getControllableBehavior(server);
new Thread() {
@Override
public void run() {
try {
// sleep to allow vagrant to unlock queries.
Thread.sleep(1000);
} catch (InterruptedException ie) {
}
// Poll the server once more
IStatus stat = getCDKPoller(server).getCurrentStateSynchronous(getServer());
if (stat.getSeverity() == IStatus.ERROR) {
beh.setServerStopped();
beh.setRunMode("run");
beh.putSharedData(CDKServerBehaviour.PROP_CACHED_PASSWORD, null);
beh.putSharedData(CDKServerBehaviour.PROP_CACHED_USER, null);
} else {
// The shutdown failed. We'll set the server to started and indicate a requiresForce
beh.setServerStarted();
setNextStopRequiresForce(true);
}
}
}.start();
if (listener != null)
DebugPlugin.getDefault().removeDebugEventListener(listener);
}
use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class CDKLaunchController method handleOpenShiftUnavailable.
private void handleOpenShiftUnavailable(final IControllableServerBehavior beh, final OpenShiftNotReadyPollingException osnrpe) {
// Log error? Show dialog?
((ControllableServerBehavior) beh).setServerStarted();
((Server) beh.getServer()).setMode(ILaunchManager.RUN_MODE);
new Job(osnrpe.getMessage()) {
@Override
protected IStatus run(IProgressMonitor monitor) {
return CDKCoreActivator.statusFactory().errorStatus("Error contacting OpenShift", osnrpe);
}
}.schedule();
}
use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class AbstractCDKLaunchController method handleOpenShiftUnavailable.
private void handleOpenShiftUnavailable(final IControllableServerBehavior beh, final OpenShiftNotReadyPollingException osnrpe) {
// Log error? Show dialog?
((ControllableServerBehavior) beh).setServerStarted();
((Server) beh.getServer()).setMode("run");
new Job(osnrpe.getMessage()) {
@Override
protected IStatus run(IProgressMonitor monitor) {
return CDKCoreActivator.statusFactory().errorStatus("Error contacting OpenShift", osnrpe);
}
}.schedule();
}
Aggregations