/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
*/
/**
* The task called when we want to restart the server.
*
*/
{
private boolean starting;
/**
* Constructor of the task.
* @param info the control panel information.
* @param dlg the progress dialog where the task progress will be displayed.
*/
{
}
/**
* {@inheritDoc}
*/
{
if (starting)
{
return Type.START_SERVER;
}
else
{
return Type.STOP_SERVER;
}
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
return null;
}
/**
* Returns the full path of the start command-line.
* @return the full path of the start command-line.
*/
{
return startTask.getCommandLinePath();
}
/**
* Returns the arguments of the start command-line.
* @return the arguments of the start command-line.
*/
{
return startTask.getCommandLineArguments();
}
/**
* Returns the full path of the stop command-line.
* @return the full path of the stop command-line.
*/
{
return getCommandLinePath("stop-ds");
}
/**
* {@inheritDoc}
*/
public void runTask()
{
starting = false;
{
public void run()
{
}
});
// To display new status
getInfo().stopPooling();
try
{
if (returnCode != 0)
{
}
else
{
{
public void run()
{
}
});
starting = true;
// To display new status
if (returnCode != 0)
{
}
else
{
}
}
}
catch (Throwable t)
{
lastException = t;
}
getInfo().startPooling();
}
}