bd41e3d191efbc13a2f4079c8dad40ff240751c2
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / MDController.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.openflow.md.core;
10
11 import java.util.ArrayList;
12 import java.util.Collection;
13 import java.util.LinkedHashSet;
14 import java.util.List;
15 import java.util.Map;
16 import java.util.concurrent.BlockingQueue;
17 import java.util.concurrent.ConcurrentHashMap;
18 import java.util.concurrent.ConcurrentMap;
19 import java.util.concurrent.ExecutionException;
20 import java.util.concurrent.Future;
21 import java.util.concurrent.LinkedBlockingQueue;
22 import java.util.concurrent.RejectedExecutionException;
23 import java.util.concurrent.RejectedExecutionHandler;
24 import java.util.concurrent.ThreadPoolExecutor;
25 import java.util.concurrent.TimeUnit;
26 import java.util.concurrent.TimeoutException;
27
28 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
29 import org.opendaylight.openflowplugin.api.OFConstants;
30 import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
31 import org.opendaylight.openflowplugin.api.openflow.md.core.NotificationQueueWrapper;
32 import org.opendaylight.openflowplugin.api.openflow.md.core.TranslatorKey;
33 import org.opendaylight.openflowplugin.extension.api.core.extension.ExtensionConverterProvider;
34 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
35 import org.opendaylight.openflowplugin.openflow.md.core.translator.ErrorTranslator;
36 import org.opendaylight.openflowplugin.openflow.md.core.translator.ErrorV10Translator;
37 import org.opendaylight.openflowplugin.openflow.md.core.translator.ExperimenterTranslator;
38 import org.opendaylight.openflowplugin.openflow.md.core.translator.FeaturesV10ToNodeConnectorUpdatedTranslator;
39 import org.opendaylight.openflowplugin.openflow.md.core.translator.FlowRemovedTranslator;
40 import org.opendaylight.openflowplugin.openflow.md.core.translator.MultiPartMessageDescToNodeUpdatedTranslator;
41 import org.opendaylight.openflowplugin.openflow.md.core.translator.MultiPartReplyPortToNodeConnectorUpdatedTranslator;
42 import org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTableFeaturesToTableUpdatedTranslator;
43 import org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTranslator;
44 import org.opendaylight.openflowplugin.openflow.md.core.translator.NotificationPlainTranslator;
45 import org.opendaylight.openflowplugin.openflow.md.core.translator.PacketInTranslator;
46 import org.opendaylight.openflowplugin.openflow.md.core.translator.PacketInV10Translator;
47 import org.opendaylight.openflowplugin.openflow.md.core.translator.PortStatusMessageToNodeConnectorUpdatedTranslator;
48 import org.opendaylight.openflowplugin.openflow.md.lldp.LLDPSpeakerPopListener;
49 import org.opendaylight.openflowplugin.api.openflow.md.queue.PopListener;
50 import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
51 import org.opendaylight.openflowplugin.api.statistics.MessageSpy;
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification;
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved;
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.AggregateFlowStatisticsUpdate;
55 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowsStatisticsUpdate;
56 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdate;
57 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupDescStatsUpdated;
58 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdated;
59 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated;
60 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdated;
61 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved;
62 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeUpdated;
63 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterConfigStatsUpdated;
64 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterFeaturesUpdated;
65 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterStatisticsUpdated;
66 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadActionErrorNotification;
67 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadInstructionErrorNotification;
68 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadMatchErrorNotification;
69 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadRequestErrorNotification;
70 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.ExperimenterErrorNotification;
71 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.FlowModErrorNotification;
72 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.GroupModErrorNotification;
73 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.HelloFailedErrorNotification;
74 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.MeterModErrorNotification;
75 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.PortModErrorNotification;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.QueueOpErrorNotification;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.RoleRequestErrorNotification;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.SwitchConfigErrorNotification;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.TableFeaturesErrorNotification;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.TableModErrorNotification;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
85 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
86 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
87 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
88 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
89 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
90 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
91 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.NodeConnectorStatisticsUpdate;
92 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.QueueStatisticsUpdate;
93 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.TableUpdated;
94 import org.opendaylight.yangtools.yang.binding.DataContainer;
95 import org.opendaylight.yangtools.yang.binding.DataObject;
96 import org.slf4j.Logger;
97 import org.slf4j.LoggerFactory;
98
99 import com.google.common.util.concurrent.ForwardingBlockingQueue;
100 import com.google.common.util.concurrent.Futures;
101 import com.google.common.util.concurrent.ListenableFuture;
102 import com.google.common.util.concurrent.ListeningExecutorService;
103 import com.google.common.util.concurrent.MoreExecutors;
104
105 /**
106  *
107  */
108 public class MDController implements IMDController, AutoCloseable {
109
110     private static final Logger LOG = LoggerFactory.getLogger(MDController.class);
111
112     private Collection<SwitchConnectionProvider> switchConnectionProviders;
113
114     private ConcurrentMap<TranslatorKey, Collection<IMDMessageTranslator<OfHeader, List<DataObject>>>> messageTranslators;
115     private Map<Class<? extends DataObject>, Collection<PopListener<DataObject>>> popListeners;
116     private MessageSpy<DataContainer> messageSpyCounter;
117
118     final private int OF10 = OFConstants.OFP_VERSION_1_0;
119     final private int OF13 = OFConstants.OFP_VERSION_1_3;
120
121     private ErrorHandlerSimpleImpl errorHandler;
122
123     private ExtensionConverterProvider extensionConverterProvider;
124
125     /**
126      * @return translator mapping
127      */
128     public Map<TranslatorKey, Collection<IMDMessageTranslator<OfHeader, List<DataObject>>>> getMessageTranslators() {
129         return messageTranslators;
130     }
131
132     /**
133      * provisioning of translator mapping
134      */
135     public void init() {
136         LOG.debug("init");
137
138         OpenflowPortsUtil.init();
139
140         messageTranslators = new ConcurrentHashMap<>();
141         popListeners = new ConcurrentHashMap<>();
142         //TODO: move registration to factory
143         addMessageTranslator(ErrorMessage.class, OF10, new ErrorV10Translator());
144         addMessageTranslator(ErrorMessage.class, OF13, new ErrorTranslator());
145         addMessageTranslator(FlowRemovedMessage.class, OF10, new FlowRemovedTranslator());
146         addMessageTranslator(FlowRemovedMessage.class, OF13, new FlowRemovedTranslator());
147         addMessageTranslator(PacketInMessage.class,OF10, new PacketInV10Translator());
148         addMessageTranslator(PacketInMessage.class,OF13, new PacketInTranslator());
149         addMessageTranslator(PortStatusMessage.class,OF10, new PortStatusMessageToNodeConnectorUpdatedTranslator());
150         addMessageTranslator(PortStatusMessage.class,OF13, new PortStatusMessageToNodeConnectorUpdatedTranslator());
151         addMessageTranslator(MultipartReplyMessage.class,OF13,new MultiPartReplyPortToNodeConnectorUpdatedTranslator());
152         addMessageTranslator(MultipartReplyMessage.class,OF10, new MultiPartMessageDescToNodeUpdatedTranslator());
153         addMessageTranslator(MultipartReplyMessage.class,OF13, new MultiPartMessageDescToNodeUpdatedTranslator());
154         addMessageTranslator(ExperimenterMessage.class, OF10, new ExperimenterTranslator());
155         addMessageTranslator(MultipartReplyMessage.class,OF10, new MultipartReplyTranslator());
156         addMessageTranslator(MultipartReplyMessage.class,OF13, new MultipartReplyTranslator());
157         addMessageTranslator(MultipartReplyMessage.class,OF13,new MultipartReplyTableFeaturesToTableUpdatedTranslator());
158         addMessageTranslator(GetFeaturesOutput.class,OF10, new FeaturesV10ToNodeConnectorUpdatedTranslator());
159         addMessageTranslator(NotificationQueueWrapper.class, OF10, new NotificationPlainTranslator());
160         addMessageTranslator(NotificationQueueWrapper.class, OF13, new NotificationPlainTranslator());
161
162         NotificationPopListener<DataObject> notificationPopListener = new NotificationPopListener<DataObject>();
163         notificationPopListener.setNotificationProviderService(
164                 OFSessionUtil.getSessionManager().getNotificationProviderService());
165         notificationPopListener.setMessageSpy(messageSpyCounter);
166
167         //TODO: move registration to factory
168         addMessagePopListener(NodeErrorNotification.class, notificationPopListener);
169         addMessagePopListener(BadActionErrorNotification.class, notificationPopListener);
170         addMessagePopListener(BadInstructionErrorNotification.class, notificationPopListener);
171         addMessagePopListener(BadMatchErrorNotification.class, notificationPopListener);
172         addMessagePopListener(BadRequestErrorNotification.class, notificationPopListener);
173         addMessagePopListener(ExperimenterErrorNotification.class, notificationPopListener);
174         addMessagePopListener(FlowModErrorNotification.class, notificationPopListener);
175         addMessagePopListener(GroupModErrorNotification.class, notificationPopListener);
176         addMessagePopListener(HelloFailedErrorNotification.class, notificationPopListener);
177         addMessagePopListener(MeterModErrorNotification.class, notificationPopListener);
178         addMessagePopListener(PortModErrorNotification.class, notificationPopListener);
179         addMessagePopListener(QueueOpErrorNotification.class, notificationPopListener);
180         addMessagePopListener(RoleRequestErrorNotification.class, notificationPopListener);
181         addMessagePopListener(SwitchConfigErrorNotification.class, notificationPopListener);
182         addMessagePopListener(TableFeaturesErrorNotification.class, notificationPopListener);
183         addMessagePopListener(TableModErrorNotification.class, notificationPopListener);
184         addMessagePopListener(NodeConnectorUpdated.class,notificationPopListener);
185         addMessagePopListener(PacketReceived.class,notificationPopListener);
186         addMessagePopListener(TransmitPacketInput.class, notificationPopListener);
187         addMessagePopListener(NodeUpdated.class, notificationPopListener);
188         addMessagePopListener(NodeRemoved.class, notificationPopListener);
189
190         addMessagePopListener(SwitchFlowRemoved.class, notificationPopListener);
191         addMessagePopListener(TableUpdated.class, notificationPopListener);
192
193         //Notification registration for flow statistics
194         addMessagePopListener(FlowsStatisticsUpdate.class, notificationPopListener);
195         addMessagePopListener(AggregateFlowStatisticsUpdate.class, notificationPopListener);
196
197         //Notification registrations for group-statistics
198         addMessagePopListener(GroupStatisticsUpdated.class, notificationPopListener);
199         addMessagePopListener(GroupFeaturesUpdated.class, notificationPopListener);
200         addMessagePopListener(GroupDescStatsUpdated.class, notificationPopListener);
201
202         //Notification registrations for meter-statistics
203         addMessagePopListener(MeterStatisticsUpdated.class, notificationPopListener);
204         addMessagePopListener(MeterConfigStatsUpdated.class, notificationPopListener);
205         addMessagePopListener(MeterFeaturesUpdated.class, notificationPopListener);
206
207         //Notification registration for port-statistics
208         addMessagePopListener(NodeConnectorStatisticsUpdate.class, notificationPopListener);
209
210         //Notification registration for flow-table statistics
211         addMessagePopListener(FlowTableStatisticsUpdate.class, notificationPopListener);
212
213         //Notification registration for queue-statistics
214         addMessagePopListener(QueueStatisticsUpdate.class, notificationPopListener);
215
216         //Notification for LLDPSpeaker
217         LLDPSpeakerPopListener<DataObject> lldpPopListener  = new LLDPSpeakerPopListener<DataObject>();
218         addMessagePopListener(NodeConnectorUpdated.class,lldpPopListener);
219
220         // Push the updated Listeners to Session Manager which will be then picked up by ConnectionConductor eventually
221         OFSessionUtil.getSessionManager().setTranslatorMapping(messageTranslators);
222         OFSessionUtil.getSessionManager().setPopListenerMapping(popListeners);
223         OFSessionUtil.getSessionManager().setMessageSpy(messageSpyCounter);
224
225         // prepare worker pool for rpc
226         // TODO: get size from configSubsystem
227         int rpcThreadLimit = 10;
228         ListeningExecutorService rpcPoolDelegator = createRpcPoolSpyDecorated(rpcThreadLimit, messageSpyCounter);
229         OFSessionUtil.getSessionManager().setRpcPool(rpcPoolDelegator);
230         OFSessionUtil.getSessionManager().setExtensionConverterProvider(extensionConverterProvider);
231
232     }
233
234     /**
235      * @param rpcThreadLimit
236      * @param messageSpy
237      * @return
238      */
239     private static ListeningExecutorService createRpcPoolSpyDecorated(final int rpcThreadLimit, final MessageSpy<DataContainer> messageSpy) {
240         final BlockingQueue<Runnable> delegate = new LinkedBlockingQueue<>(100000);
241         final BlockingQueue<Runnable> queue = new ForwardingBlockingQueue<Runnable>() {
242             @Override
243             protected BlockingQueue<Runnable> delegate() {
244                 return delegate;
245             }
246
247             @Override
248             public boolean offer(final Runnable r) {
249                 // ThreadPoolExecutor will spawn a new thread after core size is reached only
250                 // if the queue.offer returns false.
251                 return false;
252             }
253         };
254
255         ThreadPoolLoggingExecutor rpcPool = new ThreadPoolLoggingExecutor(rpcThreadLimit, rpcThreadLimit, 0L,
256                 TimeUnit.MILLISECONDS, queue, "OFRpc");
257         rpcPool.setRejectedExecutionHandler(new RejectedExecutionHandler() {
258                         @Override
259                         public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
260                                 try {
261                                         executor.getQueue().put(r);
262                                 } catch (InterruptedException e) {
263                                         throw new RejectedExecutionException("Interrupted while waiting on queue", e);
264                                 }
265
266                         }
267                 });
268         ListeningExecutorService listeningRpcPool = MoreExecutors.listeningDecorator(rpcPool);
269         RpcListeningExecutorService rpcPoolDecorated = new RpcListeningExecutorService(listeningRpcPool);
270         rpcPoolDecorated.setMessageSpy(messageSpy);
271         return rpcPoolDecorated;
272     }
273
274     /**
275      * @param switchConnectionProviders
276      *            the switchConnectionProviders to set
277      */
278     public void setSwitchConnectionProviders(final Collection<SwitchConnectionProvider> switchConnectionProviders) {
279         this.switchConnectionProviders = switchConnectionProviders;
280     }
281
282     /**
283      * Function called by dependency manager after "init ()" is called and after
284      * the services provided by the class are registered in the service registry
285      *
286      */
287     public void start() {
288         LOG.debug("starting ..");
289         LOG.debug("switchConnectionProvider: " + switchConnectionProviders);
290         // setup handler
291         SwitchConnectionHandlerImpl switchConnectionHandler = new SwitchConnectionHandlerImpl();
292         switchConnectionHandler.setMessageSpy(messageSpyCounter);
293
294         errorHandler = new ErrorHandlerSimpleImpl();
295
296         switchConnectionHandler.setErrorHandler(errorHandler);
297         switchConnectionHandler.init();
298
299         List<ListenableFuture<Boolean>> starterChain = new ArrayList<>(switchConnectionProviders.size());
300         for (SwitchConnectionProvider switchConnectionPrv : switchConnectionProviders) {
301             switchConnectionPrv.setSwitchConnectionHandler(switchConnectionHandler);
302             ListenableFuture<Boolean> isOnlineFuture = switchConnectionPrv.startup();
303             starterChain.add(isOnlineFuture);
304         }
305
306         Future<List<Boolean>> srvStarted = Futures.allAsList(starterChain);
307     }
308
309     /**
310      * Function called by the dependency manager before the services exported by
311      * the component are unregistered, this will be followed by a "destroy ()"
312      * calls
313      *
314      */
315     public void stop() {
316         LOG.debug("stopping");
317         List<ListenableFuture<Boolean>> stopChain = new ArrayList<>(switchConnectionProviders.size());
318         try {
319             for (SwitchConnectionProvider switchConnectionPrv : switchConnectionProviders) {
320                 ListenableFuture<Boolean> shutdown =  switchConnectionPrv.shutdown();
321                 stopChain.add(shutdown);
322             }
323             Futures.allAsList(stopChain).get(5000, TimeUnit.MILLISECONDS);
324         } catch (InterruptedException | ExecutionException | TimeoutException e) {
325             LOG.error(e.getMessage(), e);
326         }
327         close();
328     }
329
330     /**
331      * Function called by the dependency manager when at least one dependency
332      * become unsatisfied or when the component is shutting down because for
333      * example bundle is being stopped.
334      *
335      */
336     public void destroy() {
337         close();
338     }
339
340     @Override
341     public void addMessageTranslator(final Class<? extends DataObject> messageType, final int version, final IMDMessageTranslator<OfHeader, List<DataObject>> translator) {
342         TranslatorKey tKey = new TranslatorKey(version, messageType.getName());
343
344         Collection<IMDMessageTranslator<OfHeader, List<DataObject>>> existingValues = messageTranslators.get(tKey);
345         if (existingValues == null) {
346             existingValues = new LinkedHashSet<>();
347             messageTranslators.put(tKey, existingValues);
348         }
349         existingValues.add(translator);
350         LOG.debug("{} is now translated by {}", messageType, translator);
351     }
352
353     @Override
354     public void removeMessageTranslator(final Class<? extends DataObject> messageType, final int version, final IMDMessageTranslator<OfHeader, List<DataObject>> translator) {
355         TranslatorKey tKey = new TranslatorKey(version, messageType.getName());
356         Collection<IMDMessageTranslator<OfHeader, List<DataObject>>> values = messageTranslators.get(tKey);
357         if (values != null) {
358             values.remove(translator);
359             if (values.isEmpty()) {
360                 messageTranslators.remove(tKey);
361             }
362             LOG.debug("{} is now removed from translators", translator);
363          }
364     }
365
366     @Override
367     public void addMessagePopListener(final Class<? extends DataObject> messageType, final PopListener<DataObject> popListener) {
368         Collection<PopListener<DataObject>> existingValues = popListeners.get(messageType);
369         if (existingValues == null) {
370             existingValues = new LinkedHashSet<>();
371             popListeners.put(messageType, existingValues);
372         }
373         existingValues.add(popListener);
374         LOG.debug("{} is now popListened by {}", messageType, popListener);
375     }
376
377     @Override
378     public void removeMessagePopListener(final Class<? extends DataObject> messageType, final PopListener<DataObject> popListener) {
379         Collection<PopListener<DataObject>> values = popListeners.get(messageType);
380         if (values != null) {
381             values.remove(popListener);
382             if (values.isEmpty()) {
383                 popListeners.remove(messageType);
384             }
385             LOG.debug("{} is now removed from popListeners", popListener);
386          }
387     }
388
389     /**
390      * @param messageSpyCounter the messageSpyCounter to set
391      */
392     public void setMessageSpyCounter(
393             final MessageSpy<DataContainer> messageSpyCounter) {
394         this.messageSpyCounter = messageSpyCounter;
395     }
396
397     @Override
398     public void close() {
399         LOG.debug("close");
400         messageSpyCounter = null;
401         messageTranslators = null;
402         popListeners = null;
403         for (SwitchConnectionProvider switchConnectionPrv : switchConnectionProviders) {
404             switchConnectionPrv.setSwitchConnectionHandler(null);
405         }
406         switchConnectionProviders = null;
407         OpenflowPortsUtil.close();
408         OFSessionUtil.releaseSessionManager();
409         errorHandler = null;
410     }
411
412     /**
413      * @param extensionConverterProvider
414      */
415     public void setExtensionConverterProvider(ExtensionConverterProvider extensionConverterProvider) {
416         this.extensionConverterProvider = extensionConverterProvider;
417     }
418 }