for (ModelNode node : nodes)
{
if (ModelAdapter.wasSuccess(node))
{
ModelNode servletNode = node.get(RESULT);
DeployedServlet servlet = deployedServletEntityAdapter.fromDMR(servletNode);
servlet.setName(servletNode.get("servlet-name").asString());
servlet.setType(DeploymentDataType.servlet);
servlet.setSubsystem(subsystem);
servlet.setAddress(addressFor(subsystem.getAddress(), "servlet", servlet.getName()));
servlets.add(servlet);
}
}
}
callback.onSuccess(servlets);