Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C615172F7 for ; Thu, 30 Apr 2015 12:58:45 +0000 (UTC) Received: (qmail 69090 invoked by uid 500); 30 Apr 2015 12:58:45 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 69056 invoked by uid 500); 30 Apr 2015 12:58:45 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 69045 invoked by uid 99); 30 Apr 2015 12:58:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 12:58:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 12:58:20 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id A34E92AB04 for ; Thu, 30 Apr 2015 12:57:58 +0000 (UTC) Received: (qmail 64585 invoked by uid 99); 30 Apr 2015 12:57:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 12:57:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B693DE0061; Thu, 30 Apr 2015 12:57:57 +0000 (UTC) From: neykov To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: Startup info Content-Type: text/plain Message-Id: <20150430125757.B693DE0061@git1-us-west.apache.org> Date: Thu, 30 Apr 2015 12:57:57 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user neykov commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/614#discussion_r29426132 --- Diff: usage/rest-server/src/main/java/brooklyn/rest/filter/ServerStatusCheckFilter.java --- @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package brooklyn.rest.filter; + +import java.io.IOException; +import java.util.Set; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.core.Response; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import brooklyn.config.BrooklynServiceAttributes; +import brooklyn.management.ManagementContext; +import brooklyn.management.ha.ManagementNodeState; +import brooklyn.rest.domain.ApiError; +import brooklyn.rest.util.WebResourceUtils; + +import com.google.common.collect.Sets; + +/** + * Checks that the request is appropriate given the high availability status of the server. + * + * @see brooklyn.management.ha.ManagementNodeState + */ +public class ServerStatusCheckFilter implements Filter { --- End diff -- Looks like a work-in-progress version of `HaMasterCheckFilter`, how is it different? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---