ComponentsDefine.java 4.9 KB
Newer Older
1
/*
wu-sheng's avatar
wu-sheng 已提交
2 3 4 5 6 7
 * 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
8 9 10 11 12 13 14 15 16 17 18
 *
 *     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.
 *
 */

19 20

package org.apache.skywalking.apm.network.trace.component;
21 22

/**
23 24
 * The supported list of skywalking java sniffer.
 *
25 26 27
 * @author wusheng
 */
public class ComponentsDefine {
P
pengys5 已提交
28

29
    public static final OfficialComponent TOMCAT = new OfficialComponent(1, "Tomcat");
30 31 32 33

    public static final OfficialComponent HTTPCLIENT = new OfficialComponent(2, "HttpClient");

    public static final OfficialComponent DUBBO = new OfficialComponent(3, "Dubbo");
A
ascrutae 已提交
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

    public static final OfficialComponent H2 = new OfficialComponent(4, "H2");

    public static final OfficialComponent MYSQL = new OfficialComponent(5, "Mysql");

    public static final OfficialComponent ORACLE = new OfficialComponent(6, "ORACLE");

    public static final OfficialComponent REDIS = new OfficialComponent(7, "Redis");

    public static final OfficialComponent MOTAN = new OfficialComponent(8, "Motan");

    public static final OfficialComponent MONGODB = new OfficialComponent(9, "MongoDB");

    public static final OfficialComponent RESIN = new OfficialComponent(10, "Resin");

    public static final OfficialComponent FEIGN = new OfficialComponent(11, "Feign");

    public static final OfficialComponent OKHTTP = new OfficialComponent(12, "OKHttp");
52

A
ascrutae 已提交
53 54
    public static final OfficialComponent SPRING_REST_TEMPLATE = new OfficialComponent(13, "SpringRestTemplate");

A
ascrutae 已提交
55
    public static final OfficialComponent SPRING_MVC_ANNOTATION = new OfficialComponent(14, "SpringMVC");
A
ascrutae 已提交
56

57
    public static final OfficialComponent STRUTS2 = new OfficialComponent(15, "Struts2");
58

59
    public static final OfficialComponent NUTZ_MVC_ANNOTATION = new OfficialComponent(16, "NutzMVC");
60 61

    public static final OfficialComponent NUTZ_HTTP = new OfficialComponent(17, "NutzHttp");
62

A
ascrutae 已提交
63 64
    public static final OfficialComponent JETTY_CLIENT = new OfficialComponent(18, "JettyClient");

G
gaohongtao 已提交
65 66
    public static final OfficialComponent JETTY_SERVER = new OfficialComponent(19, "JettyServer");

67
    public static final OfficialComponent MEMCACHED = new OfficialComponent(20, "Memcached");
G
gaohongtao 已提交
68 69 70

    public static final OfficialComponent SHARDING_JDBC = new OfficialComponent(21, "ShardingJDBC");

A
ascrutae 已提交
71
    public static final OfficialComponent POSTGRESQL = new OfficialComponent(22, "PostgreSQL");
A
ascrutae 已提交
72

73
    public static final OfficialComponent GRPC = new OfficialComponent(23, "GRPC");
A
ascrutae 已提交
74

G
gaohongtao 已提交
75
    public static final OfficialComponent ELASTIC_JOB = new OfficialComponent(24, "ElasticJob");
76 77 78
  
    public static final OfficialComponent ROCKET_MQ = new OfficialComponent(25, "RocketMQ");

79 80
    public static final OfficialComponent HTTP_ASYNC_CLIENT = new OfficialComponent(26, "httpasyncclient");

A
ascrutae 已提交
81
    public static final OfficialComponent KAFKA = new OfficialComponent(27, "Kafka");
82 83
  
    public static final OfficialComponent SERVICECOMB = new OfficialComponent(28, "ServiceComb");
L
lytscu 已提交
84

A
ascrutae 已提交
85 86
    public static final OfficialComponent HYSTRIX =  new OfficialComponent(29, "Hystrix");

87
    private static ComponentsDefine INSTANCE = new ComponentsDefine();
P
pengys5 已提交
88 89 90 91

    private String[] components;

    public static ComponentsDefine getInstance() {
92
        return INSTANCE;
P
pengys5 已提交
93 94 95
    }

    public ComponentsDefine() {
A
ascrutae 已提交
96
        components = new String[30];
P
pengys5 已提交
97 98 99 100 101 102 103 104 105 106 107 108
        addComponent(TOMCAT);
        addComponent(HTTPCLIENT);
        addComponent(DUBBO);
        addComponent(H2);
        addComponent(MYSQL);
        addComponent(ORACLE);
        addComponent(REDIS);
        addComponent(MOTAN);
        addComponent(MONGODB);
        addComponent(RESIN);
        addComponent(FEIGN);
        addComponent(OKHTTP);
A
ascrutae 已提交
109 110
        addComponent(SPRING_REST_TEMPLATE);
        addComponent(SPRING_MVC_ANNOTATION);
A
ascrutae 已提交
111
        addComponent(STRUTS2);
112 113
        addComponent(NUTZ_MVC_ANNOTATION);
        addComponent(NUTZ_HTTP);
A
ascrutae 已提交
114 115
        addComponent(JETTY_CLIENT);
        addComponent(JETTY_SERVER);
116
        addComponent(MEMCACHED);
G
gaohongtao 已提交
117
        addComponent(SHARDING_JDBC);
A
ascrutae 已提交
118
        addComponent(POSTGRESQL);
A
ascrutae 已提交
119
        addComponent(GRPC);
G
gaohongtao 已提交
120
        addComponent(ELASTIC_JOB);
A
ascrutae 已提交
121
        addComponent(ROCKET_MQ);
122
        addComponent(HTTP_ASYNC_CLIENT);
A
ascrutae 已提交
123
        addComponent(KAFKA);
L
lytscu 已提交
124
        addComponent(SERVICECOMB);
A
ascrutae 已提交
125
        addComponent(HYSTRIX);
P
pengys5 已提交
126 127 128 129 130
    }

    private void addComponent(OfficialComponent component) {
        components[component.getId()] = component.getName();
    }
131
}