@Override public void notify(final String method, final Object parameter) { Collection<Endpoint> _get = this.extensionProviders.get(method); for (final Endpoint endpoint : _get) { try { endpoint.notify(method, parameter); } catch (final Throwable _t) { if (_t instanceof UnsupportedOperationException) { final UnsupportedOperationException e = (UnsupportedOperationException)_t; if ((e != ILanguageServerExtension.NOT_HANDLED_EXCEPTION)) { throw e; } } else { throw Exceptions.sneakyThrow(_t); } } } }
@Override public void notify(String method, Object parameter) { // Check the registered method handlers Function<Object, CompletableFuture<Object>> handler = methodHandlers.get(method); if (handler != null) { handler.apply(parameter); return; } // Ask the delegate objects whether they can handle the notification generically int notifiedDelegates = 0; for (Object delegate : delegates) { if (delegate instanceof Endpoint) { ((Endpoint) delegate).notify(method, parameter); notifiedDelegates++; } } if (notifiedDelegates == 0) { // Create a log message about the unsupported method String message = "Unsupported notification method: " + method; if (isOptionalMethod(method)) { LOG.log(Level.INFO, message); } else { LOG.log(Level.WARNING, message); } } }
@Override public void notify(String method, Object parameter) { // Check the registered method handlers Function<Object, CompletableFuture<Object>> handler = methodHandlers.get(method); if (handler != null) { handler.apply(parameter); return; } // Ask the delegate objects whether they can handle the notification generically int notifiedDelegates = 0; for (Object delegate : delegates) { if (delegate instanceof Endpoint) { ((Endpoint) delegate).notify(method, parameter); notifiedDelegates++; } } if (notifiedDelegates == 0) { // Create a log message about the unsupported method String message = "Unsupported notification method: " + method; if (isOptionalMethod(method)) { LOG.log(Level.INFO, message); } else { LOG.log(Level.WARNING, message); } } }
Object params = getParams(args, methodInfo); if (methodInfo.isNotification) { delegate.notify(methodInfo.name, params); return null;
Object params = getParams(args, methodInfo); if (methodInfo.isNotification) { delegate.notify(methodInfo.name, params); return null;
protected void handleNotification(NotificationMessage notificationMessage) { if (!handleCancellation(notificationMessage)) { // Forward the notification to the local endpoint try { localEndpoint.notify(notificationMessage.getMethod(), notificationMessage.getParams()); } catch (Exception exception) { LOG.log(Level.WARNING, "Notification threw an exception: " + notificationMessage, exception); } } }
protected void handleNotification(NotificationMessage notificationMessage) { if (!handleCancellation(notificationMessage)) { // Forward the notification to the local endpoint try { localEndpoint.notify(notificationMessage.getMethod(), notificationMessage.getParams()); } catch (Exception exception) { LOG.log(Level.WARNING, "Notification threw an exception: " + notificationMessage, exception); } } }