@Override public void notify(String method, Object parameter) { NotificationMessage notificationMessage = new NotificationMessage(); notificationMessage.setJsonrpc(MessageConstants.JSONRPC_VERSION); notificationMessage.setMethod(method); notificationMessage.setParams(parameter); out.consume(notificationMessage); }
protected NotificationMessage createNotificationMessage(String method, Object parameter) { NotificationMessage notificationMessage = new NotificationMessage(); notificationMessage.setJsonrpc(MessageConstants.JSONRPC_VERSION); notificationMessage.setMethod(method); notificationMessage.setParams(parameter); return notificationMessage; }
protected ResponseMessage createResponseMessage(RequestMessage requestMessage) { ResponseMessage responseMessage = new ResponseMessage(); responseMessage.setId(requestMessage.getId()); responseMessage.setJsonrpc(MessageConstants.JSONRPC_VERSION); return responseMessage; }