public class ListServerSocketServlet extends BaseHttpServlet implements CartePluginInterface
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_PATH |
static String |
PARAM_HOSTNAME |
static String |
PARAM_ONLY_OPEN |
detections, jobMap, log, socketRepository, transformationMap
Constructor and Description |
---|
ListServerSocketServlet() |
ListServerSocketServlet(TransformationMap transformationMap) |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
String |
getContextPath() |
String |
getService() |
String |
toString() |
convertContextPath, doDelete, doPost, doPut, getDetections, getJobMap, getSocketRepository, getTransformationMap, isJettyMode, logBasic, logBasic, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logRowlevel, setJettyMode, setup
doHead, doOptions, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isJettyMode, setJettyMode, setup
public static final String CONTEXT_PATH
public static final String PARAM_HOSTNAME
public static final String PARAM_ONLY_OPEN
public ListServerSocketServlet()
public ListServerSocketServlet(TransformationMap transformationMap)
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Gets list of ports for specified host. Method is used for listing all or just open ports for specified host. Response contains port number, which transformation it is (was) used for, current status of the port and last date time used.
Example Request:
GET /kettle/listSocket/?host=127.0.0.1
name | description | type |
---|---|---|
host | Host to get ports for. | query |
onlyOpen | Boolean flag that indicates whether all or only open ports should be returned.
Set it to Y to get the list of only currently open ports. |
boolean, optional |
text: | HTML |
media types: | text/html |
Response is HTML document listing the ports requested.
Example Response:
List of server sockets on server '127.0.0.1' Ports for host '127.0.0.1'
Found 5 ports for host '127.0.0.1'8088 : Transformation=dummy-trans, crt/Dummy (do nothing) 2.0 --> sll/Dummy (do nothing).0 id=b20bcd03-9682-4327-8c42-b129faabbfe1, allocated=false time=Mon Nov 17 09:31:15 BRT 2014
8089 : Transformation=dummy-trans, crt/Dummy (do nothing) 2.0 --> sll/Dummy (do nothing).1 id=b20bcd03-9682-4327-8c42-b129faabbfe1, allocated=false time=Mon Nov 17 09:31:15 BRT 2014
8090 : Transformation=dummy-trans, crt/Dummy (do nothing) 2.0 --> sll/Dummy (do nothing).2 id=b20bcd03-9682-4327-8c42-b129faabbfe1, allocated=false time=Mon Nov 17 09:31:15 BRT 2014
8091 : Transformation=dummy-trans, crt/Dummy (do nothing) 2.0 --> sll/Dummy (do nothing).3 id=b20bcd03-9682-4327-8c42-b129faabbfe1, allocated=false time=Mon Nov 17 09:31:15 BRT 2014
8092 : Transformation=dummy-trans, crt/Dummy (do nothing) 2.0 --> sll/Dummy (do nothing).4 id=b20bcd03-9682-4327-8c42-b129faabbfe1, allocated=false time=Mon Nov 17 09:31:15 BRT 2014
code | description |
---|---|
200 | Request was processed. |
500 | Internal server error occurs during request processing. |
doGet
in interface CartePluginInterface
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public String getService()
getService
in interface CarteServletInterface
public String getContextPath()
getContextPath
in interface CartePluginInterface
Copyright © 2018 Hitachi Vantara. All rights reserved.