blob: 2964afdf6a5649e4bdfa6946a831a877c6d265c9 [file] [log] [blame]
/**********************************************************************
* Copyright (c) 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
 *
* Contributors:
* IBM Corporation - Initial API and implementation
**********************************************************************/
package org.eclipse.wst.server.core;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.server.core.model.IServerPort;
/**
* An interface to a TCP/IP monitor.
*
* <p>This interface is not intended to be implemented by clients.</p>
*/
public interface IServerMonitor {
/**
* Returns the id of the monitor.
*
* @return java.lang.String
*/
public String getId();
/**
* Returns the label (name) of this monitor.
*
* @return java.lang.String
*/
public String getName();
/**
* Returns the description of this monitor.
*
* @return java.lang.String
*/
public String getDescription();
/**
* Start monitoring the given port, and return the port number to
* tunnel requests through. The monitorPort is the new port to use, or
* -1 to pick a random port.
*
* @param port
* @return
*/
public int startMonitoring(IServer server, IServerPort port, int monitorPort) throws CoreException;
/**
* Stop monitoring the given port.
*
* @param port
*/
public void stopMonitoring(IServer server, IServerPort port);
}