001package com.thetransactioncompany.jsonrpc2.server; 002 003 004import com.thetransactioncompany.jsonrpc2.JSONRPC2Notification; 005 006 007/** 008 * Interface for handling JSON-RPC 2.0 notifications. 009 * 010 * @author Vladimir Dzhuvinov 011 */ 012public interface NotificationHandler { 013 014 015 /** 016 * Gets the names of the handled JSON-RPC 2.0 notification methods. 017 * 018 * @return The names of the handled JSON-RPC 2.0 notification methods. 019 */ 020 public String[] handledNotifications(); 021 022 023 /** 024 * Processes a JSON-RPC 2.0 notification. 025 * 026 * <p>Note that JSON-RPC 2.0 notifications don't produce a response! 027 * 028 * @param notification A valid JSON-RPC 2.0 notification instance. 029 * Must not be {@code null}. 030 * @param notificationCtx Context information about the notification 031 * message, may be {@code null} if undefined. 032 */ 033 public void process(final JSONRPC2Notification notification, final MessageContext notificationCtx); 034 035}