17
17
18
18
package org .apache .eventmesh .runtime .boot ;
19
19
20
- import io .netty .bootstrap .ServerBootstrap ;
21
- import io .netty .buffer .PooledByteBufAllocator ;
22
- import io .netty .channel .*;
23
- import io .netty .channel .socket .SocketChannel ;
24
- import io .netty .channel .socket .nio .NioServerSocketChannel ;
25
20
import org .apache .eventmesh .runtime .configuration .EventMeshAmqpConfiguration ;
21
+ import org .apache .eventmesh .runtime .core .protocol .amqp .exchange .RouteComponent ;
26
22
import org .apache .eventmesh .runtime .core .protocol .amqp .metadata .MetaStore ;
23
+ import org .apache .eventmesh .runtime .core .protocol .amqp .producer .AmqpProducerManager ;
27
24
import org .apache .eventmesh .runtime .core .protocol .amqp .remoting .codec .AmqpCodeDecoder ;
28
25
import org .apache .eventmesh .runtime .core .protocol .amqp .remoting .codec .AmqpCodeEncoder ;
29
26
import org .apache .eventmesh .runtime .core .protocol .amqp .service .ExchangeService ;
32
29
import org .apache .eventmesh .runtime .core .protocol .amqp .service .QueueServiceImpl ;
33
30
import org .apache .eventmesh .runtime .registry .Registry ;
34
31
32
+ import io .netty .bootstrap .ServerBootstrap ;
33
+ import io .netty .buffer .PooledByteBufAllocator ;
34
+ import io .netty .channel .*;
35
+ import io .netty .channel .socket .SocketChannel ;
36
+ import io .netty .channel .socket .nio .NioServerSocketChannel ;
37
+
35
38
public class EventMeshAmqpServer extends AbstractRemotingServer {
36
39
37
40
private EventMeshServer eventMeshServer ;
@@ -46,12 +49,18 @@ public class EventMeshAmqpServer extends AbstractRemotingServer {
46
49
47
50
private MetaStore metaStore ;
48
51
52
+ private RouteComponent routeComponent ;
53
+
54
+ private AmqpProducerManager producerManager ;
55
+
49
56
public EventMeshAmqpServer (EventMeshServer eventMeshServer ,
50
- EventMeshAmqpConfiguration eventMeshAmqpConfiguration , Registry registry ) {
57
+ EventMeshAmqpConfiguration eventMeshAmqpConfiguration , Registry registry , RouteComponent routeComponent , AmqpProducerManager producerManager ) {
51
58
super ();
52
59
this .eventMeshServer = eventMeshServer ;
53
60
this .eventMeshAmqpConfiguration = eventMeshAmqpConfiguration ;
54
61
this .registry = registry ;
62
+ this .routeComponent = routeComponent ;
63
+ this .producerManager = producerManager ;
55
64
this .metaStore =new MetaStore (this );
56
65
this .exchangeService =new ExchangeServiceImpl (this ,metaStore );
57
66
this .queueService =new QueueServiceImpl (this ,metaStore );
@@ -131,6 +140,18 @@ public QueueService getQueueService() {
131
140
return queueService ;
132
141
}
133
142
143
+ public MetaStore getMetaStore () {
144
+ return metaStore ;
145
+ }
146
+
147
+ public RouteComponent getRouteComponent () {
148
+ return routeComponent ;
149
+ }
150
+
151
+ public AmqpProducerManager getProducerManager () {
152
+ return producerManager ;
153
+ }
154
+
134
155
/**
135
156
* A channel initializer that initialize channels for amqp protocol.
136
157
*/
0 commit comments