Search in sources :

Example 1 with ServiceMixServerBehavior

use of com.centurylink.mdw.plugin.server.ServiceMixServerBehavior in project mdw-designer by CenturyLinkCloud.

the class ServerRunnerLaunchConfiguration method launch.

public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
    IServer server = ServerUtil.getServer(configuration);
    if (server == null) {
        showError("Launch configuration could not find server", "Server Launch", null);
        return;
    }
    ServiceMixServerBehavior serverBehave = null;
    if (server.getServerType().getId().startsWith(ServiceMixServer.ID_PREFIX))
        serverBehave = (ServiceMixServerBehavior) server.loadAdapter(ServiceMixServerBehavior.class, null);
    else if (server.getServerType().getId().startsWith(FuseServer.ID_PREFIX))
        serverBehave = (FuseServerBehavior) server.loadAdapter(FuseServerBehavior.class, null);
    if (serverBehave == null) {
        showError("ServerBehaviorDelagate could not be loaded", "Server Launch", null);
        return;
    }
    if (!"true".equals(configuration.getAttribute("STOP", "false")))
        serverBehave.start(mode.equals(ILaunchManager.DEBUG_MODE), monitor);
}
Also used : IServer(org.eclipse.wst.server.core.IServer) ServiceMixServerBehavior(com.centurylink.mdw.plugin.server.ServiceMixServerBehavior)

Aggregations

ServiceMixServerBehavior (com.centurylink.mdw.plugin.server.ServiceMixServerBehavior)1 IServer (org.eclipse.wst.server.core.IServer)1