ServerSvc.I Interface

com.bea.ide.workspace
ServerSvc.I Interface

public static interface ServerSvc.I
Enclosing class

ServerSvc

Method Summary

public void
addPropertyChangeListener(PropertyChangeListener l)
public void
addPropertyChangeListener(String strProp, PropertyChangeListener l)
public void
ensureDeploymentAttempted(IWorkspace ws)
If the application is undeployed, an attempt is made to deploy it.
public boolean
ensureWebLogicRunning()
Makes sure WebLogic server is running.
public URL
getBaseURL(IProject project)
Returns the base URL to the server for the given project.
public IFile
getBuildTargetDir(IProject project)
Returns the path to Knex's secret class directory for all compiler products for the given project.
public String
getContextPath(IProject project)
Returns the context path for the given project.
public String
getDomain()
Returns the domain of the server (e.g.
public Context
getInitialContext(ClassLoader rmiClassLoader)
Returns an initial context for communication with WebLogic Server, which uses the given ClassLoader for RMI codegen.
public Context
getInitialContext()
Returns an initial context for communication with WebLogic Server.
public URI
getJDKHome(IWorkspace ws)
Returns the URI to the JDK Home directory.
public Object
getMBeanHomeDialog()
Return the MBeanHome for the server, or show an alert and return null if it cannot be found.
public String
getRunnableURL(IDocument doc)
Returns the URL to a given document on the server.
public String[]
getServerClasspath(IWorkspace ws)
Returns the classpath of the server as an array of paths.
public IFile
getServerDomainDir(IWorkspace ws)
Returns the directory of the workspace's domain.
public String
getServerName()
Returns the name of the server (e.g.
public String
getServerProperty(IWorkspace ws, String propertyName)
Returns a server property as a String.
public URI
getWlsHome(IWorkspace ws)
Returns the WLS Home directory.
public int
getWlsStatus()
Returns the running status of the server
public boolean
isServerConfigured(IWorkspace ws)
Returns true if there is presently a server configured and it exists, false otherwise.
public boolean
isUndeployed(IWorkspace ws)
Returns true if the user has undeployed the application manually, or has chosen not to replace on WLS an application of the same name with the current application.
public boolean
isWebLogicRunning()
Returns true if the application's associated server is running
public void
removePropertyChangeListener(PropertyChangeListener l)
public void
removePropertyChangeListener(String strProp, PropertyChangeListener l)
public void
setWlsStatus(int status)
Sets the running status of the server
public boolean
shouldStartWebLogic()
Checks if WLS needs to be started, and if it's OK with the user to start it.
public void
startPollingServer()
Starts polling the server, keeping the status bar up to date
public boolean
startServer(Frame f)
Starts the server in a background task.
public void
stopServer()
Launches a background task to stop WebLogic server.
public void
updateServerStatus()
Asynchronously update the server status right now.

Method Detail

addPropertyChangeListener(PropertyChangeListener) Method

public void addPropertyChangeListener(PropertyChangeListener l)

addPropertyChangeListener(String, PropertyChangeListener) Method

public void addPropertyChangeListener(String strProp, 
                                      PropertyChangeListener l)

ensureDeploymentAttempted(IWorkspace) Method

public void ensureDeploymentAttempted(IWorkspace ws)
If the application is undeployed, an attempt is made to deploy it. The user will be prompted if there is a conflict on the server, and may choose not to deploy.


ensureWebLogicRunning() Method

public boolean ensureWebLogicRunning()
Makes sure WebLogic server is running. If WebLogic is stopped, starts WebLogic. Returns true if WebLogic server is running, returns false if the user prevented it from starting.


getBaseURL(IProject) Method

public URL getBaseURL(IProject project)
Returns the base URL to the server for the given project. Will return null if the project is not a web-app.


getBuildTargetDir(IProject) Method

public IFile getBuildTargetDir(IProject project)
Returns the path to Knex's secret class directory for all compiler products for the given project.


getContextPath(IProject) Method

DEPRECATED Use IWebAppDriver instead. E.g. IWebProjectDriver driver = (IWebProjectDriver)_project.getDriver(IWebProjectDriver.class); driver.getContextPath();

public String getContextPath(IProject project)
Returns the context path for the given project. The context path is the path on the server to the project. E.g. "/samples" for the samples project.


getDomain() Method

public String getDomain()
Returns the domain of the server (e.g. "workshop")


getInitialContext(ClassLoader) Method

public Context getInitialContext(ClassLoader rmiClassLoader)
throws NamingException, URISyntaxException
Returns an initial context for communication with WebLogic Server, which uses the given ClassLoader for RMI codegen.

Parameters

rmiClassLoader
the ClassLoader to use when generating RMI stubs.

Exceptions

NamingException
URISyntaxException

getInitialContext() Method

public Context getInitialContext()
throws NamingException, URISyntaxException
Returns an initial context for communication with WebLogic Server. This will use the Workshop ExtensionClassLoader for RMI codegen.

Exceptions

NamingException
URISyntaxException

getJDKHome(IWorkspace) Method

public URI getJDKHome(IWorkspace ws)
Returns the URI to the JDK Home directory. e.g file:///c:/jdk1.4


getMBeanHomeDialog() Method

public Object getMBeanHomeDialog()
Return the MBeanHome for the server, or show an alert and return null if it cannot be found.

Returns

the MBeanHome

getRunnableURL(IDocument) Method

public String getRunnableURL(IDocument doc)
Returns the URL to a given document on the server. Will return null if the document is not available on the server.


getServerClasspath(IWorkspace) Method

public String[] getServerClasspath(IWorkspace ws)
Returns the classpath of the server as an array of paths.


getServerDomainDir(IWorkspace) Method

public IFile getServerDomainDir(IWorkspace ws)
Returns the directory of the workspace's domain. May return null if no server has been configured for his workspace.

Parameters

ws
Workspace that defines the server

getServerName() Method

public String getServerName()
Returns the name of the server (e.g. "cgServer")


getServerProperty(IWorkspace, String) Method

public String getServerProperty(IWorkspace ws, 
                                String propertyName)
Returns a server property as a String. May return null if no server has been configured for this workspace.

Parameters

ws
Workspace that defines the server
propertyName
Name of the property. e.g. ServerSvc.HOSTNAME

getWlsHome(IWorkspace) Method

public URI getWlsHome(IWorkspace ws)
Returns the WLS Home directory. e.g. file:///c:/bea/weblogic81


getWlsStatus() Method

public int getWlsStatus()
Returns the running status of the server


isServerConfigured(IWorkspace) Method

public boolean isServerConfigured(IWorkspace ws)
Returns true if there is presently a server configured and it exists, false otherwise.


isUndeployed(IWorkspace) Method

public boolean isUndeployed(IWorkspace ws)
Returns true if the user has undeployed the application manually, or has chosen not to replace on WLS an application of the same name with the current application. False indicates only that deployment has been attempted, not that it was successful.


isWebLogicRunning() Method

public boolean isWebLogicRunning()
Returns true if the application's associated server is running


removePropertyChangeListener(PropertyChangeListener) Method

public void removePropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener(String, PropertyChangeListener) Method

public void removePropertyChangeListener(String strProp, 
                                         PropertyChangeListener l)

setWlsStatus(int) Method

public void setWlsStatus(int status)
Sets the running status of the server


shouldStartWebLogic() Method

public boolean shouldStartWebLogic()
Checks if WLS needs to be started, and if it's OK with the user to start it.

Returns

false if WLS is already running, the server is misconfigured, or the user doesn't want to start it.

startPollingServer() Method

public void startPollingServer()
Starts polling the server, keeping the status bar up to date


startServer(Frame) Method

public boolean startServer(Frame f)
Starts the server in a background task. If f is not null, a dialog is shown to the user while the server is starting up and the call blocks. Otherwise, it returns after beginning the startup process. As this method may show dialogs (errors in addition to the optional status dialog), it should only be called on the AWTEventThread.


stopServer() Method

public void stopServer()
Launches a background task to stop WebLogic server.


updateServerStatus() Method

public void updateServerStatus()
Asynchronously update the server status right now. Normally the server status is updated every few seconds.