org.netbeans.modules.j2ee.deployment.plugins.api
Class ServerProgress

java.lang.Object
  extended by org.netbeans.modules.j2ee.deployment.plugins.api.ServerProgress
All Implemented Interfaces:
javax.enterprise.deploy.spi.status.ProgressObject

public class ServerProgress
extends Object
implements javax.enterprise.deploy.spi.status.ProgressObject

This is an utility class to avoid exposing deployment interface ProgressObject directly in server management SPI StartServer.

Typical usage is for plugin StartServer implementation to create instance of ServerProgress and return it to caller of startDeploymentManager, stopDeploymentManager and startDebugging. Plugin will update caller on progress of the operation through method calls to set status.


Nested Class Summary
static class ServerProgress.Command
           
 
Field Summary
static ServerProgress.Command START_SERVER
           
static ServerProgress.Command STOP_SERVER
           
 
Constructor Summary
ServerProgress(Object server)
          Creates a new instance of StartServerProgress
 
Method Summary
 void addProgressListener(javax.enterprise.deploy.spi.status.ProgressListener pol)
           
 void cancel()
           
protected  javax.enterprise.deploy.spi.status.ProgressEvent createCompletedProgressEvent(javax.enterprise.deploy.shared.CommandType command, String message)
           
protected  javax.enterprise.deploy.spi.status.DeploymentStatus createDeploymentStatus(javax.enterprise.deploy.shared.CommandType comtype, String msg, javax.enterprise.deploy.shared.StateType state)
           
protected  javax.enterprise.deploy.spi.status.ProgressEvent createFailedProgressEvent(javax.enterprise.deploy.shared.CommandType command, String message)
           
protected  javax.enterprise.deploy.spi.status.ProgressEvent createRunningProgressEvent(javax.enterprise.deploy.shared.CommandType command, String message)
           
 javax.enterprise.deploy.spi.status.ClientConfiguration getClientConfiguration(javax.enterprise.deploy.spi.TargetModuleID targetModuleID)
           
 javax.enterprise.deploy.spi.status.DeploymentStatus getDeploymentStatus()
           
 javax.enterprise.deploy.spi.TargetModuleID[] getResultTargetModuleIDs()
           
 boolean isCancelSupported()
           
 boolean isStopSupported()
           
protected  void notify(javax.enterprise.deploy.spi.status.ProgressEvent pe)
           
 void removeProgressListener(javax.enterprise.deploy.spi.status.ProgressListener pol)
           
 void setStatusStartCompleted(String message)
           
 void setStatusStartFailed(String message)
           
 void setStatusStartRunning(String message)
           
 void setStatusStopCompleted(String message)
           
 void setStatusStopFailed(String message)
           
 void setStatusStopRunning(String message)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_SERVER

public static final ServerProgress.Command START_SERVER

STOP_SERVER

public static final ServerProgress.Command STOP_SERVER
Constructor Detail

ServerProgress

public ServerProgress(Object server)
Creates a new instance of StartServerProgress

Method Detail

setStatusStartRunning

public void setStatusStartRunning(String message)

setStatusStartFailed

public void setStatusStartFailed(String message)

setStatusStartCompleted

public void setStatusStartCompleted(String message)

setStatusStopRunning

public void setStatusStopRunning(String message)

setStatusStopFailed

public void setStatusStopFailed(String message)

setStatusStopCompleted

public void setStatusStopCompleted(String message)

notify

protected void notify(javax.enterprise.deploy.spi.status.ProgressEvent pe)

createDeploymentStatus

protected javax.enterprise.deploy.spi.status.DeploymentStatus createDeploymentStatus(javax.enterprise.deploy.shared.CommandType comtype,
                                                                                     String msg,
                                                                                     javax.enterprise.deploy.shared.StateType state)

createCompletedProgressEvent

protected javax.enterprise.deploy.spi.status.ProgressEvent createCompletedProgressEvent(javax.enterprise.deploy.shared.CommandType command,
                                                                                        String message)

createFailedProgressEvent

protected javax.enterprise.deploy.spi.status.ProgressEvent createFailedProgressEvent(javax.enterprise.deploy.shared.CommandType command,
                                                                                     String message)

createRunningProgressEvent

protected javax.enterprise.deploy.spi.status.ProgressEvent createRunningProgressEvent(javax.enterprise.deploy.shared.CommandType command,
                                                                                      String message)

addProgressListener

public void addProgressListener(javax.enterprise.deploy.spi.status.ProgressListener pol)
Specified by:
addProgressListener in interface javax.enterprise.deploy.spi.status.ProgressObject

removeProgressListener

public void removeProgressListener(javax.enterprise.deploy.spi.status.ProgressListener pol)
Specified by:
removeProgressListener in interface javax.enterprise.deploy.spi.status.ProgressObject

isCancelSupported

public boolean isCancelSupported()
Specified by:
isCancelSupported in interface javax.enterprise.deploy.spi.status.ProgressObject

cancel

public void cancel()
            throws javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException
Specified by:
cancel in interface javax.enterprise.deploy.spi.status.ProgressObject
Throws:
javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException

isStopSupported

public boolean isStopSupported()
Specified by:
isStopSupported in interface javax.enterprise.deploy.spi.status.ProgressObject

stop

public void stop()
          throws javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException
Specified by:
stop in interface javax.enterprise.deploy.spi.status.ProgressObject
Throws:
javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException

getClientConfiguration

public javax.enterprise.deploy.spi.status.ClientConfiguration getClientConfiguration(javax.enterprise.deploy.spi.TargetModuleID targetModuleID)
Specified by:
getClientConfiguration in interface javax.enterprise.deploy.spi.status.ProgressObject

getDeploymentStatus

public javax.enterprise.deploy.spi.status.DeploymentStatus getDeploymentStatus()
Specified by:
getDeploymentStatus in interface javax.enterprise.deploy.spi.status.ProgressObject

getResultTargetModuleIDs

public javax.enterprise.deploy.spi.TargetModuleID[] getResultTargetModuleIDs()
Specified by:
getResultTargetModuleIDs in interface javax.enterprise.deploy.spi.status.ProgressObject

 

Built on March 27 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.