Skip to content
Permalink
Browse files
Move more code to here
  • Loading branch information
chickenlj committed Jan 12, 2018
1 parent a4fc1c8 commit 9716f380d6e3ab606e9cd5ebe6beceec02b956d4
Show file tree
Hide file tree
Showing 53 changed files with 733 additions and 102 deletions.
@@ -151,7 +151,7 @@ limitations under the License.
<artifactItem>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${project.parent.version}</version>
<version>${dubbo_all_version}</version>
<outputDirectory>${project.build.directory}/dubbo</outputDirectory>
<includes>META-INF/assembly/**</includes>
</artifactItem>
@@ -22,12 +22,12 @@ limitations under the License.
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
<outputDirectory>bin</outputDirectory>
<directory>${project.build.directory}/classes/META-INF/assembly/bin</directory>
<outputDirectory>assembly.bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>src/main/assembly/conf</directory>
<directory>src/main/resources/conf</directory>
<outputDirectory>conf</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
@@ -0,0 +1,27 @@
/*
* 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 com.alibaba.dubbo.monitor.simple;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.container.Main;

public class MonitorStarter {
public static void main(String[] args) {
System.setProperty(Constants.DUBBO_PROPERTIES_KEY, "conf/dubbo.properties");
Main.main(args);
}
}
@@ -24,6 +24,7 @@
import com.alibaba.dubbo.common.utils.NamedThreadFactory;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.monitor.MonitorService;
import com.alibaba.dubbo.monitor.simple.common.CountUtils;

import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.common;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.common;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@@ -14,10 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.common;

import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.io.Serializable;
import java.util.Comparator;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.common;

import java.util.ArrayList;
import java.util.Arrays;
@@ -14,13 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.container;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.Container;
import com.alibaba.dubbo.monitor.simple.servlet.PageServlet;
import com.alibaba.dubbo.monitor.simple.servlet.ResourceFilter;

import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
@@ -38,7 +40,7 @@ public class JettyContainer implements Container {
public static final String JETTY_DIRECTORY = "dubbo.jetty.directory";
public static final String JETTY_PAGES = "dubbo.jetty.page";
public static final int DEFAULT_JETTY_PORT = 8080;
private static final Logger logger = LoggerFactory.getLogger(com.alibaba.dubbo.container.jetty.JettyContainer.class);
private static final Logger logger = LoggerFactory.getLogger(JettyContainer.class);
SelectChannelConnector connector;

public void start() {
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.monitor.simple;
package com.alibaba.dubbo.monitor.simple.container;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
@@ -17,10 +17,10 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.List;
@@ -18,9 +18,9 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.MonitorService;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.io.File;
import java.text.SimpleDateFormat;
@@ -18,8 +18,8 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.remoting.exchange.ExchangeChannel;
import com.alibaba.dubbo.remoting.exchange.ExchangeServer;
import com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol;
@@ -18,9 +18,9 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.List;
@@ -17,9 +17,9 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.HashSet;
@@ -18,10 +18,10 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.container.page.PageServlet;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.monitor.simple.servlet.PageServlet;

import java.util.ArrayList;
import java.util.List;
@@ -19,10 +19,10 @@
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.List;
@@ -17,9 +17,9 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import org.apache.log4j.Appender;
import org.apache.log4j.FileAppender;
@@ -18,9 +18,9 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.List;
@@ -17,8 +17,8 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.registry.Registry;
import com.alibaba.dubbo.registry.support.AbstractRegistry;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;
@@ -18,9 +18,9 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.registry.Registry;
import com.alibaba.dubbo.registry.support.AbstractRegistry;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;
@@ -18,9 +18,9 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.remoting.exchange.ExchangeServer;
import com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol;

@@ -18,10 +18,10 @@

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.List;
@@ -18,10 +18,10 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.utils.ConfigUtils;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.MonitorService;
import com.alibaba.dubbo.monitor.simple.CountUtils;
import com.alibaba.dubbo.monitor.simple.common.CountUtils;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.io.File;
import java.text.SimpleDateFormat;
@@ -21,9 +21,9 @@
import com.alibaba.dubbo.common.status.Status;
import com.alibaba.dubbo.common.status.StatusChecker;
import com.alibaba.dubbo.common.status.support.StatusUtils;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.util.ArrayList;
import java.util.HashMap;
@@ -17,8 +17,8 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.registry.Registry;
import com.alibaba.dubbo.registry.support.AbstractRegistry;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;
@@ -19,9 +19,9 @@
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.Version;
import com.alibaba.dubbo.common.utils.NetUtils;
import com.alibaba.dubbo.container.page.Menu;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.common.Menu;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

import java.lang.management.ManagementFactory;
import java.text.SimpleDateFormat;
@@ -47,7 +47,7 @@ public Page handle(URL url) {

row = new ArrayList<String>();
row.add("Version");
row.add(Version.getVersion(com.alibaba.dubbo.container.page.pages.SystemPageHandler.class, "2.0.0"));
row.add(Version.getVersion(SystemPageHandler.class, "2.0.0"));
rows.add(row);

row = new ArrayList<String>();
@@ -17,9 +17,9 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;

/**
* UnregisterPageHandler
@@ -17,9 +17,9 @@
package com.alibaba.dubbo.monitor.simple.pages;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.container.page.Page;
import com.alibaba.dubbo.container.page.PageHandler;
import com.alibaba.dubbo.monitor.simple.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.common.Page;
import com.alibaba.dubbo.monitor.simple.container.RegistryContainer;
import com.alibaba.dubbo.monitor.simple.servlet.PageHandler;
import com.alibaba.dubbo.registry.NotifyListener;

import java.util.List;

0 comments on commit 9716f38

Please sign in to comment.