use of com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract in project orientdb by orientechnologies.
the class OServerCommandPostKillDbConnection method doPost.
private void doPost(OHttpRequest iRequest, OHttpResponse iResponse, String db, String command) throws IOException {
final List<OClientConnection> connections = server.getClientConnectionManager().getConnections();
for (OClientConnection connection : connections) {
if (connection.getProtocol() instanceof ONetworkProtocolHttpAbstract) {
final ONetworkProtocolHttpAbstract http = (ONetworkProtocolHttpAbstract) connection.getProtocol();
final OHttpRequest req = http.getRequest();
if (req != null && req != iRequest && req.sessionId.equals(iRequest.sessionId)) {
server.getClientConnectionManager().interrupt(connection.getId());
}
}
}
iResponse.send(OHttpUtils.STATUS_OK_NOCONTENT_CODE, OHttpUtils.STATUS_OK_NOCONTENT_DESCRIPTION, OHttpUtils.CONTENT_TEXT_PLAIN, null, null);
}
Aggregations