ComponentsDefine.java 6.0 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

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

    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");
42

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

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

47
    public static final OfficialComponent STRUTS2 = new OfficialComponent(15, "Struts2");
48

49
    public static final OfficialComponent NUTZ_MVC_ANNOTATION = new OfficialComponent(16, "NutzMVC");
50 51

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

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

G
gaohongtao 已提交
55 56 57 58
    public static final OfficialComponent JETTY_SERVER = new OfficialComponent(19, "JettyServer");

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

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

G
gaohongtao 已提交
61
    public static final OfficialComponent ELASTIC_JOB = new OfficialComponent(24, "ElasticJob");
62

63 64
    public static final OfficialComponent HTTP_ASYNC_CLIENT = new OfficialComponent(26, "httpasyncclient");

65
    public static final OfficialComponent SERVICECOMB = new OfficialComponent(28, "ServiceComb");
L
lytscu 已提交
66

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

X
Xin,Zhang 已提交
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
    public static final OfficialComponent JEDIS =  new OfficialComponent(30, "Jedis");

    public static final OfficialComponent H2_JDBC_DRIVER =  new OfficialComponent(32, "h2-jdbc-driver");

    public static final OfficialComponent MYSQL_JDBC_DRIVER = new OfficialComponent(33, "mysql-connector-java");

    public static final OfficialComponent OJDBC = new OfficialComponent(34, "ojdbc");

    public static final OfficialComponent SPYMEMCACHED = new OfficialComponent(35, "Spymemcached");

    public static final OfficialComponent XMEMCACHED = new OfficialComponent(36, "Xmemcached");

    public static final OfficialComponent POSTGRESQL_DRIVER = new OfficialComponent(37, "postgresql-jdbc-driver");

    public static final OfficialComponent ROCKET_MQ_PRODUCER = new OfficialComponent(38, "rocketMQ-producer");

    public static final OfficialComponent ROCKET_MQ_CONSUMER = new OfficialComponent(39, "rocketMQ-consumer");

    public static final OfficialComponent KAFKA_PRODUCER = new OfficialComponent(40, "kafka-producer");

    public static final OfficialComponent KAFKA_CONSUMER = new OfficialComponent(41, "kafka-consumer");

    public static final OfficialComponent MONGO_DRIVER = new OfficialComponent(42, "mongodb-driver");

93 94
    public static final OfficialComponent SOFARPC =  new OfficialComponent(43, "SOFARPC");

95 96 97 98
    public static final  OfficialComponent ACTIVEMQ_PRODUCER = new OfficialComponent(45,"activemq-producer");

    public static final  OfficialComponent ACTIVEMQ_CONSUMER = new OfficialComponent(46,"activemq-consumer");

99
    private static ComponentsDefine INSTANCE = new ComponentsDefine();
P
pengys5 已提交
100 101 102 103

    private String[] components;

    public static ComponentsDefine getInstance() {
104
        return INSTANCE;
P
pengys5 已提交
105 106 107
    }

    public ComponentsDefine() {
108
        components = new String[47];
P
pengys5 已提交
109 110 111 112 113 114 115
        addComponent(TOMCAT);
        addComponent(HTTPCLIENT);
        addComponent(DUBBO);
        addComponent(MOTAN);
        addComponent(RESIN);
        addComponent(FEIGN);
        addComponent(OKHTTP);
A
ascrutae 已提交
116 117
        addComponent(SPRING_REST_TEMPLATE);
        addComponent(SPRING_MVC_ANNOTATION);
A
ascrutae 已提交
118
        addComponent(STRUTS2);
119 120
        addComponent(NUTZ_MVC_ANNOTATION);
        addComponent(NUTZ_HTTP);
A
ascrutae 已提交
121 122
        addComponent(JETTY_CLIENT);
        addComponent(JETTY_SERVER);
G
gaohongtao 已提交
123
        addComponent(SHARDING_JDBC);
A
ascrutae 已提交
124
        addComponent(GRPC);
G
gaohongtao 已提交
125
        addComponent(ELASTIC_JOB);
126
        addComponent(HTTP_ASYNC_CLIENT);
L
lytscu 已提交
127
        addComponent(SERVICECOMB);
A
ascrutae 已提交
128
        addComponent(HYSTRIX);
X
Xin,Zhang 已提交
129 130 131 132 133 134 135 136 137 138 139 140
        addComponent(H2_JDBC_DRIVER);
        addComponent(MYSQL_JDBC_DRIVER);
        addComponent(OJDBC);
        addComponent(JEDIS);
        addComponent(SPYMEMCACHED);
        addComponent(XMEMCACHED);
        addComponent(POSTGRESQL_DRIVER);
        addComponent(ROCKET_MQ_PRODUCER);
        addComponent(ROCKET_MQ_CONSUMER);
        addComponent(KAFKA_PRODUCER);
        addComponent(KAFKA_CONSUMER);
        addComponent(MONGO_DRIVER);
141
        addComponent(SOFARPC);
142 143 144 145
        addComponent(ACTIVEMQ_PRODUCER);
        addComponent(ACTIVEMQ_CONSUMER);


P
pengys5 已提交
146 147 148 149 150
    }

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