Skip to content

Commit

Permalink
Move packages under runtime to admin-core and rebuild dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Pil0tXia committed Jul 24, 2023
1 parent 489c47c commit 417d14f
Show file tree
Hide file tree
Showing 51 changed files with 131 additions and 1,007 deletions.
23 changes: 18 additions & 5 deletions eventmesh-admin/eventmesh-admin-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,29 @@


dependencies {
implementation project(":eventmesh-common")

implementation "io.cloudevents:cloudevents-core"
implementation "io.cloudevents:cloudevents-json-jackson"

implementation "org.apache.httpcomponents:httpclient"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-core"
implementation "com.fasterxml.jackson.core:jackson-annotations"

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation project(":eventmesh-common")
implementation project(":eventmesh-admin:eventmesh-admin-rocketmq")
implementation project(":eventmesh-runtime")
implementation project(":eventmesh-webhook:eventmesh-webhook-admin")
implementation project(":eventmesh-webhook:eventmesh-webhook-api")
implementation project(":eventmesh-registry-plugin:eventmesh-registry-api")
implementation project(":eventmesh-metrics-plugin:eventmesh-metrics-api")

compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"

testImplementation 'org.mockito:mockito-core'
testImplementation 'org.mockito:mockito-inline'
testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-inline"
testImplementation "org.powermock:powermock-module-junit4"
testImplementation "org.powermock:powermock-api-mockito2"
testImplementation "commons-io:commons-io"
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.controller;

package org.apache.eventmesh.admin.core.controller;

import org.apache.eventmesh.admin.core.handler.ConfigurationHandler;
import org.apache.eventmesh.admin.core.handler.DeleteWebHookConfigHandler;
import org.apache.eventmesh.admin.core.handler.EventHandler;
import org.apache.eventmesh.admin.core.handler.GrpcClientHandler;
import org.apache.eventmesh.admin.core.handler.RedirectClientBySubSystemHandler;
import org.apache.eventmesh.admin.core.handler.RegistryHandler;
import org.apache.eventmesh.admin.core.handler.RejectAllClientHandler;
import org.apache.eventmesh.admin.core.handler.RejectClientByIpPortHandler;
import org.apache.eventmesh.admin.core.handler.RejectClientBySubSystemHandler;
import org.apache.eventmesh.admin.core.handler.ShowClientBySystemHandler;
import org.apache.eventmesh.admin.core.handler.ShowClientHandler;
import org.apache.eventmesh.admin.core.handler.ShowListenClientByTopicHandler;
import org.apache.eventmesh.admin.core.handler.TCPClientHandler;
import org.apache.eventmesh.admin.core.handler.TopicHandler;
import org.apache.eventmesh.admin.rocketmq.controller.AdminController;
import org.apache.eventmesh.runtime.admin.handler.ConfigurationHandler;
import org.apache.eventmesh.runtime.admin.handler.DeleteWebHookConfigHandler;
import org.apache.eventmesh.runtime.admin.handler.EventHandler;
import org.apache.eventmesh.runtime.admin.handler.GrpcClientHandler;
import org.apache.eventmesh.runtime.admin.handler.HTTPClientHandler;
import org.apache.eventmesh.runtime.admin.handler.InsertWebHookConfigHandler;
import org.apache.eventmesh.runtime.admin.handler.MetricsHandler;
import org.apache.eventmesh.runtime.admin.handler.QueryRecommendEventMeshHandler;
import org.apache.eventmesh.runtime.admin.handler.QueryWebHookConfigByIdHandler;
import org.apache.eventmesh.runtime.admin.handler.QueryWebHookConfigByManufacturerHandler;
import org.apache.eventmesh.runtime.admin.handler.RedirectClientByIpPortHandler;
import org.apache.eventmesh.runtime.admin.handler.RedirectClientByPathHandler;
import org.apache.eventmesh.runtime.admin.handler.RedirectClientBySubSystemHandler;
import org.apache.eventmesh.runtime.admin.handler.RegistryHandler;
import org.apache.eventmesh.runtime.admin.handler.RejectAllClientHandler;
import org.apache.eventmesh.runtime.admin.handler.RejectClientByIpPortHandler;
import org.apache.eventmesh.runtime.admin.handler.RejectClientBySubSystemHandler;
import org.apache.eventmesh.runtime.admin.handler.ShowClientBySystemHandler;
import org.apache.eventmesh.runtime.admin.handler.ShowClientHandler;
import org.apache.eventmesh.runtime.admin.handler.ShowListenClientByTopicHandler;
import org.apache.eventmesh.runtime.admin.handler.TCPClientHandler;
import org.apache.eventmesh.runtime.admin.handler.TopicHandler;
import org.apache.eventmesh.runtime.admin.handler.UpdateWebHookConfigHandler;
import org.apache.eventmesh.admin.core.handler.HTTPClientHandler;
import org.apache.eventmesh.admin.core.handler.InsertWebHookConfigHandler;
import org.apache.eventmesh.admin.core.handler.MetricsHandler;
import org.apache.eventmesh.admin.core.handler.QueryRecommendEventMeshHandler;
import org.apache.eventmesh.admin.core.handler.QueryWebHookConfigByIdHandler;
import org.apache.eventmesh.admin.core.handler.QueryWebHookConfigByManufacturerHandler;
import org.apache.eventmesh.admin.core.handler.RedirectClientByIpPortHandler;
import org.apache.eventmesh.admin.core.handler.RedirectClientByPathHandler;
import org.apache.eventmesh.admin.core.handler.UpdateWebHookConfigHandler;
import org.apache.eventmesh.runtime.boot.EventMeshGrpcServer;
import org.apache.eventmesh.runtime.boot.EventMeshHTTPServer;
import org.apache.eventmesh.runtime.boot.EventMeshTCPServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.controller;
package org.apache.eventmesh.admin.core.controller;

import org.apache.eventmesh.runtime.common.EventHttpHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;

import com.sun.net.httpserver.HttpHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.enums.HttpMethod;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.admin.response.Error;
import org.apache.eventmesh.runtime.admin.response.GetConfigurationResponse;
import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.response.Error;
import org.apache.eventmesh.admin.core.response.GetConfigurationResponse;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.runtime.configuration.EventMeshGrpcConfiguration;
import org.apache.eventmesh.runtime.configuration.EventMeshHTTPConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.common.utils.NetUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.webhook.api.WebHookConfig;
import org.apache.eventmesh.webhook.api.WebHookConfigOperation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.enums.HttpMethod;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.admin.response.Error;
import org.apache.eventmesh.runtime.admin.utils.HttpExchangeUtils;
import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.response.Error;
import org.apache.eventmesh.admin.core.utils.HttpExchangeUtils;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.runtime.constants.EventMeshConstants;
import org.apache.eventmesh.runtime.core.plugin.MQAdminWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.admin.core.request.DeleteGrpcClientRequest;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.enums.HttpMethod;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.admin.request.DeleteGrpcClientRequest;
import org.apache.eventmesh.runtime.admin.response.Error;
import org.apache.eventmesh.runtime.admin.response.GetClientResponse;
import org.apache.eventmesh.runtime.admin.utils.HttpExchangeUtils;
import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.response.Error;
import org.apache.eventmesh.admin.core.response.GetClientResponse;
import org.apache.eventmesh.admin.core.utils.HttpExchangeUtils;
import org.apache.eventmesh.runtime.boot.EventMeshGrpcServer;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.runtime.constants.EventMeshConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.request.DeleteHTTPClientRequest;
import org.apache.eventmesh.admin.core.response.Error;
import org.apache.eventmesh.admin.core.response.GetClientResponse;
import org.apache.eventmesh.admin.core.utils.HttpExchangeUtils;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.enums.HttpMethod;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.admin.request.DeleteHTTPClientRequest;
import org.apache.eventmesh.runtime.admin.response.Error;
import org.apache.eventmesh.runtime.admin.response.GetClientResponse;
import org.apache.eventmesh.runtime.admin.utils.HttpExchangeUtils;
import org.apache.eventmesh.runtime.boot.EventMeshHTTPServer;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.runtime.constants.EventMeshConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.common.utils.NetUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.webhook.api.WebHookConfig;
import org.apache.eventmesh.webhook.api.WebHookConfigOperation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.admin.core.response.Error;
import org.apache.eventmesh.admin.core.response.GetMetricsResponse;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.enums.HttpMethod;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.metrics.api.model.HttpSummaryMetrics;
import org.apache.eventmesh.metrics.api.model.TcpSummaryMetrics;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.admin.response.Error;
import org.apache.eventmesh.runtime.admin.response.GetMetricsResponse;
import org.apache.eventmesh.runtime.boot.EventMeshHTTPServer;
import org.apache.eventmesh.runtime.boot.EventMeshTCPServer;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.utils.NetUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.boot.EventMeshTCPServer;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.runtime.constants.EventMeshConstants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* limitations under the License.
*/

package org.apache.eventmesh.runtime.admin.handler;
package org.apache.eventmesh.admin.core.handler;

import static org.apache.eventmesh.runtime.constants.EventMeshConstants.APPLICATION_JSON;
import static org.apache.eventmesh.runtime.constants.EventMeshConstants.CONTENT_TYPE;

import org.apache.eventmesh.admin.core.controller.HttpHandlerManager;
import org.apache.eventmesh.common.Constants;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.common.utils.NetUtils;
import org.apache.eventmesh.runtime.admin.controller.HttpHandlerManager;
import org.apache.eventmesh.runtime.common.EventHttpHandler;
import org.apache.eventmesh.webhook.api.WebHookConfig;
import org.apache.eventmesh.webhook.api.WebHookConfigOperation;
Expand Down Expand Up @@ -52,7 +52,7 @@ public QueryWebHookConfigByIdHandler(WebHookConfigOperation operation, HttpHandl
@Override
public void handle(HttpExchange httpExchange) throws IOException {
NetUtils.sendSuccessResponseHeaders(httpExchange);
httpExchange.getResponseHeaders().add(CONTENT_TYPE, APPLICATION_JSON);
httpExchange.getResponseHeaders().add(EventMeshConstants.CONTENT_TYPE, EventMeshConstants.APPLICATION_JSON);

// get requestBody and resolve to WebHookConfig
String requestBody = NetUtils.parsePostBody(httpExchange);
Expand Down
Loading

0 comments on commit 417d14f

Please sign in to comment.