Deployment (ServerConnection<?> connection) { DeploymentRuntime applicationRuntime = getApplicationRuntime(myNode, DeploymentRuntime.class); for (Deployment deployment : connection.getDeployments()) { if (applicationRuntime == deployment.getRuntime()) { return deployment; } } return null; }