Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.grpc.ctl; |
| 18 | |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 19 | import com.google.common.collect.ImmutableMap; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 20 | import com.google.common.collect.ImmutableSet; |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 21 | import com.google.common.util.concurrent.Striped; |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 22 | import io.grpc.CallOptions; |
| 23 | import io.grpc.Channel; |
| 24 | import io.grpc.ClientCall; |
| 25 | import io.grpc.ClientInterceptor; |
| 26 | import io.grpc.ForwardingClientCall; |
| 27 | import io.grpc.ForwardingClientCallListener; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 28 | import io.grpc.ManagedChannel; |
| 29 | import io.grpc.ManagedChannelBuilder; |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 30 | import io.grpc.Metadata; |
| 31 | import io.grpc.MethodDescriptor; |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 32 | import io.grpc.Status; |
| 33 | import io.grpc.StatusRuntimeException; |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 34 | import org.onlab.util.Tools; |
| 35 | import org.onosproject.cfg.ComponentConfigService; |
Yi Tseng | 2a340f7 | 2018-11-02 16:52:47 -0700 | [diff] [blame] | 36 | import org.onosproject.grpc.api.GrpcChannelController; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 37 | import org.onosproject.grpc.api.GrpcChannelId; |
Carmelo Cascone | 6a1ae71 | 2018-08-10 12:19:47 -0700 | [diff] [blame] | 38 | import org.onosproject.grpc.proto.dummy.Dummy; |
| 39 | import org.onosproject.grpc.proto.dummy.DummyServiceGrpc; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 40 | import org.onosproject.net.DeviceId; |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 41 | import org.osgi.service.component.ComponentContext; |
Ray Milkey | d84f89b | 2018-08-17 14:54:17 -0700 | [diff] [blame] | 42 | import org.osgi.service.component.annotations.Activate; |
| 43 | import org.osgi.service.component.annotations.Component; |
| 44 | import org.osgi.service.component.annotations.Deactivate; |
| 45 | import org.osgi.service.component.annotations.Modified; |
| 46 | import org.osgi.service.component.annotations.Reference; |
| 47 | import org.osgi.service.component.annotations.ReferenceCardinality; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 48 | import org.slf4j.Logger; |
| 49 | import org.slf4j.LoggerFactory; |
| 50 | |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 51 | import java.io.IOException; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 52 | import java.util.Collection; |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 53 | import java.util.Dictionary; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 54 | import java.util.HashSet; |
| 55 | import java.util.Map; |
| 56 | import java.util.Optional; |
| 57 | import java.util.Set; |
| 58 | import java.util.concurrent.ConcurrentHashMap; |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 59 | import java.util.concurrent.TimeUnit; |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 60 | import java.util.concurrent.locks.Lock; |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 61 | |
| 62 | import static com.google.common.base.Preconditions.checkNotNull; |
Thomas Vachuska | 00b5d4f | 2018-10-30 15:13:20 -0700 | [diff] [blame] | 63 | import static org.onosproject.grpc.ctl.OsgiPropertyConstants.ENABLE_MESSAGE_LOG; |
| 64 | import static org.onosproject.grpc.ctl.OsgiPropertyConstants.ENABLE_MESSAGE_LOG_DEFAULT; |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 65 | |
| 66 | /** |
Yi Tseng | 2a340f7 | 2018-11-02 16:52:47 -0700 | [diff] [blame] | 67 | * Default implementation of the GrpcChannelController. |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 68 | */ |
Ray Milkey | 5739b2c | 2018-11-06 14:04:51 -0800 | [diff] [blame^] | 69 | @Component(immediate = true, service = GrpcChannelController.class, |
Thomas Vachuska | 00b5d4f | 2018-10-30 15:13:20 -0700 | [diff] [blame] | 70 | property = { |
| 71 | ENABLE_MESSAGE_LOG + ":Boolean=" + ENABLE_MESSAGE_LOG_DEFAULT, |
| 72 | }) |
Yi Tseng | 2a340f7 | 2018-11-02 16:52:47 -0700 | [diff] [blame] | 73 | public class GrpcChannelControllerImpl implements GrpcChannelController { |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 74 | |
Yi Tseng | 2a340f7 | 2018-11-02 16:52:47 -0700 | [diff] [blame] | 75 | // FIXME: Should use message size to determine whether it needs to log the message or not. |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 76 | private static final String SET_FORWARDING_PIPELINE_CONFIG_METHOD = "p4.P4Runtime/SetForwardingPipelineConfig"; |
| 77 | |
Ray Milkey | d84f89b | 2018-08-17 14:54:17 -0700 | [diff] [blame] | 78 | @Reference(cardinality = ReferenceCardinality.MANDATORY) |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 79 | protected ComponentConfigService componentConfigService; |
| 80 | |
| 81 | // Hint: set to true to log all gRPC messages received/sent on all channels |
| 82 | // Does not enable log on existing channels |
| 83 | private static final boolean DEFAULT_LOG_LEVEL = false; |
Thomas Vachuska | 00b5d4f | 2018-10-30 15:13:20 -0700 | [diff] [blame] | 84 | |
| 85 | /** Indicates whether to log all gRPC messages sent and received on all channels. */ |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 86 | public static boolean enableMessageLog = DEFAULT_LOG_LEVEL; |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 87 | |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 88 | private final Logger log = LoggerFactory.getLogger(getClass()); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 89 | |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 90 | private Map<GrpcChannelId, ManagedChannel> channels; |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 91 | private final Striped<Lock> channelLocks = Striped.lock(30); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 92 | |
| 93 | @Activate |
| 94 | public void activate() { |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 95 | componentConfigService.registerProperties(getClass()); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 96 | channels = new ConcurrentHashMap<>(); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 97 | log.info("Started"); |
| 98 | } |
| 99 | |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 100 | @Modified |
| 101 | public void modified(ComponentContext context) { |
| 102 | if (context != null) { |
| 103 | Dictionary<?, ?> properties = context.getProperties(); |
Thomas Vachuska | 00b5d4f | 2018-10-30 15:13:20 -0700 | [diff] [blame] | 104 | enableMessageLog = Tools.isPropertyEnabled(properties, ENABLE_MESSAGE_LOG, |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 105 | DEFAULT_LOG_LEVEL); |
| 106 | log.info("Configured. Log of gRPC messages is {}", enableMessageLog ? "enabled" : "disabled"); |
| 107 | } |
| 108 | } |
| 109 | |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 110 | @Deactivate |
| 111 | public void deactivate() { |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 112 | componentConfigService.unregisterProperties(getClass(), false); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 113 | channels.values().forEach(ManagedChannel::shutdown); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 114 | channels.clear(); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 115 | log.info("Stopped"); |
| 116 | } |
| 117 | |
| 118 | @Override |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 119 | public ManagedChannel connectChannel(GrpcChannelId channelId, |
| 120 | ManagedChannelBuilder<?> channelBuilder) |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 121 | throws IOException { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 122 | checkNotNull(channelId); |
| 123 | checkNotNull(channelBuilder); |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 124 | |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 125 | Lock lock = channelLocks.get(channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 126 | lock.lock(); |
| 127 | |
| 128 | try { |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 129 | channelBuilder.intercept(new InternalLogChannelInterceptor(channelId)); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 130 | ManagedChannel channel = channelBuilder.build(); |
| 131 | // Forced connection not yet implemented. Use workaround... |
| 132 | // channel.getState(true); |
| 133 | doDummyMessage(channel); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 134 | channels.put(channelId, channel); |
| 135 | return channel; |
| 136 | } finally { |
| 137 | lock.unlock(); |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 138 | } |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 139 | } |
| 140 | |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 141 | private void doDummyMessage(ManagedChannel channel) throws IOException { |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 142 | DummyServiceGrpc.DummyServiceBlockingStub dummyStub = DummyServiceGrpc |
| 143 | .newBlockingStub(channel) |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 144 | .withDeadlineAfter(CONNECTION_TIMEOUT_SECONDS, TimeUnit.SECONDS); |
| 145 | try { |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 146 | dummyStub.sayHello(Dummy.DummyMessageThatNoOneWouldReallyUse |
| 147 | .getDefaultInstance()); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 148 | } catch (StatusRuntimeException e) { |
| 149 | if (e.getStatus() != Status.UNIMPLEMENTED) { |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 150 | // UNIMPLEMENTED means that the server received our message but |
| 151 | // doesn't know how to handle it. Hence, channel is open. |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 152 | throw new IOException(e); |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | @Override |
| 158 | public boolean isChannelOpen(GrpcChannelId channelId) { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 159 | checkNotNull(channelId); |
| 160 | |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 161 | Lock lock = channelLocks.get(channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 162 | lock.lock(); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 163 | |
| 164 | try { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 165 | if (!channels.containsKey(channelId)) { |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 166 | log.warn("Can't check if channel open for unknown channel ID {}", |
| 167 | channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 168 | return false; |
| 169 | } |
| 170 | try { |
| 171 | doDummyMessage(channels.get(channelId)); |
| 172 | return true; |
| 173 | } catch (IOException e) { |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 174 | log.debug("Unable to send dummy message to {}: {}", |
| 175 | channelId, e.getCause().getMessage()); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 176 | return false; |
| 177 | } |
| 178 | } finally { |
| 179 | lock.unlock(); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 180 | } |
| 181 | } |
| 182 | |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 183 | @Override |
| 184 | public void disconnectChannel(GrpcChannelId channelId) { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 185 | checkNotNull(channelId); |
| 186 | |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 187 | Lock lock = channelLocks.get(channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 188 | lock.lock(); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 189 | |
| 190 | try { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 191 | if (!channels.containsKey(channelId)) { |
| 192 | // Nothing to do. |
| 193 | return; |
| 194 | } |
| 195 | ManagedChannel channel = channels.get(channelId); |
Carmelo Cascone | 59f57de | 2017-07-11 19:55:09 -0400 | [diff] [blame] | 196 | |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 197 | try { |
| 198 | channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); |
| 199 | } catch (InterruptedException e) { |
| 200 | log.warn("Channel {} didn't shut down in time."); |
| 201 | channel.shutdownNow(); |
Ray Milkey | 5c7d488 | 2018-02-05 14:50:39 -0800 | [diff] [blame] | 202 | Thread.currentThread().interrupt(); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | channels.remove(channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 206 | } finally { |
| 207 | lock.unlock(); |
| 208 | } |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | @Override |
| 212 | public Map<GrpcChannelId, ManagedChannel> getChannels() { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 213 | return ImmutableMap.copyOf(channels); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | @Override |
| 217 | public Collection<ManagedChannel> getChannels(final DeviceId deviceId) { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 218 | checkNotNull(deviceId); |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 219 | final Set<ManagedChannel> deviceChannels = new HashSet<>(); |
| 220 | channels.forEach((k, v) -> { |
| 221 | if (k.deviceId().equals(deviceId)) { |
| 222 | deviceChannels.add(v); |
| 223 | } |
| 224 | }); |
| 225 | |
| 226 | return ImmutableSet.copyOf(deviceChannels); |
| 227 | } |
| 228 | |
| 229 | @Override |
| 230 | public Optional<ManagedChannel> getChannel(GrpcChannelId channelId) { |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 231 | checkNotNull(channelId); |
| 232 | |
Carmelo Cascone | 158b8c4 | 2018-07-04 19:42:37 +0200 | [diff] [blame] | 233 | Lock lock = channelLocks.get(channelId); |
Carmelo Cascone | fb92407 | 2017-08-29 20:21:55 +0200 | [diff] [blame] | 234 | lock.lock(); |
| 235 | |
| 236 | try { |
| 237 | return Optional.ofNullable(channels.get(channelId)); |
| 238 | } finally { |
| 239 | lock.unlock(); |
| 240 | } |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 241 | } |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 242 | |
| 243 | /** |
| 244 | * gRPC client interceptor that logs all messages sent and received. |
| 245 | */ |
| 246 | private final class InternalLogChannelInterceptor implements ClientInterceptor { |
| 247 | |
| 248 | private final GrpcChannelId channelId; |
| 249 | |
| 250 | private InternalLogChannelInterceptor(GrpcChannelId channelId) { |
| 251 | this.channelId = channelId; |
| 252 | } |
| 253 | |
| 254 | @Override |
Carmelo Cascone | 47a853b | 2018-01-05 02:40:58 +0100 | [diff] [blame] | 255 | public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( |
| 256 | MethodDescriptor<ReqT, RespT> methodDescriptor, |
| 257 | CallOptions callOptions, Channel channel) { |
| 258 | return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>( |
| 259 | channel.newCall(methodDescriptor, callOptions.withoutWaitForReady())) { |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 260 | |
| 261 | @Override |
| 262 | public void sendMessage(ReqT message) { |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 263 | if (enableMessageLog && !methodDescriptor.getFullMethodName() |
| 264 | .startsWith(SET_FORWARDING_PIPELINE_CONFIG_METHOD)) { |
| 265 | log.info("*** SENDING GRPC MESSAGE [{}]\n{}:\n{}", |
| 266 | channelId, methodDescriptor.getFullMethodName(), |
| 267 | message.toString()); |
| 268 | } |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 269 | super.sendMessage(message); |
| 270 | } |
| 271 | |
| 272 | @Override |
| 273 | public void start(Listener<RespT> responseListener, Metadata headers) { |
| 274 | |
| 275 | ClientCall.Listener<RespT> listener = new ForwardingClientCallListener<RespT>() { |
| 276 | @Override |
| 277 | protected Listener<RespT> delegate() { |
| 278 | return responseListener; |
| 279 | } |
| 280 | |
| 281 | @Override |
| 282 | public void onMessage(RespT message) { |
Andrea Campanella | a74bdba | 2018-05-15 16:45:00 +0200 | [diff] [blame] | 283 | if (enableMessageLog) { |
| 284 | log.info("*** RECEIVED GRPC MESSAGE [{}]\n{}:\n{}", |
| 285 | channelId, methodDescriptor.getFullMethodName(), |
| 286 | message.toString()); |
| 287 | } |
Carmelo Cascone | 8d99b17 | 2017-07-18 17:26:31 -0400 | [diff] [blame] | 288 | super.onMessage(message); |
| 289 | } |
| 290 | }; |
| 291 | super.start(listener, headers); |
| 292 | } |
| 293 | }; |
| 294 | } |
| 295 | } |
Andrea Campanella | 378e21a | 2017-06-07 12:09:59 +0200 | [diff] [blame] | 296 | } |