@SubscribeMapping("/number") public int number() { return 42; } }
@SubscribeMapping("/data") // not needed for the tests but here for completeness private String getData() { return PAYLOAD; }
@SubscribeMapping("/foo") public String handleSubscribe() { return "bar"; }
@SubscribeMapping("/foo") public String handleSubscribe() { return "bar"; }
@SubscribeMapping("/data") // not needed for the tests but here for completeness @SendTo("/sendToDest") private String getDataAndSendTo() { return PAYLOAD; }
@SubscribeMapping("/sub/{foo}/{name}") public void subscribeEventDestinationVariable(@DestinationVariable("foo") String param1, @DestinationVariable("name") String param2) { this.method = "subscribeEventDestinationVariable"; this.arguments.put("foo", param1); this.arguments.put("name", param2); }
@SubscribeMapping("/jsonview") // not needed for the tests but here for completeness @JsonView(MyJacksonView1.class) public JacksonViewBean getJsonView() { JacksonViewBean payload = new JacksonViewBean(); payload.setWithView1("with"); payload.setWithView2("with"); payload.setWithoutView("without"); return payload; }
@SubscribeMapping("/number") public int number() { return 42; }
@SubscribeMapping("/queue/tweets") public Queue<Tweet> subscribe() { return this.lastTweets; }
@SubscribeMapping public Iterable<BankAccountEntry> all() { return bankAccountRepository.findAllByOrderByIdAsc(); }
@SubscribeMapping("/positions") public List<PortfolioPosition> getPositions(Principal principal) throws Exception { logger.log(Level.INFO, "Positions for " + principal.getName()); Portfolio portfolio = this.portfolioService.findPortfolio(principal.getName()); return portfolio.getPositions(); }
@SubscribeMapping("/positions") public List<PortfolioPosition> getPositions(Principal principal) throws Exception { logger.debug("Positions for " + principal.getName()); Portfolio portfolio = this.portfolioService.findPortfolio(principal.getName()); return portfolio.getPositions(); }
@SubscribeMapping("/bank-accounts/{bankAccountId}/bank-transfers") public Iterable<BankTransferEntry> bankTransfers(@DestinationVariable String bankAccountId) { log.info("Retrieve bank transfers for bank account with id {}", bankAccountId); return bankTransferRepository.findBySourceBankAccountIdOrDestinationBankAccountId(bankAccountId, bankAccountId); }
@SubscribeMapping("/{id}") public BankAccountEntry get(@DestinationVariable String id) { return bankAccountRepository.findOne(id); }
@SubscribeMapping("/initialize-me") public List<StompMessage> list() { final LinkedList<StompMessage> events = new LinkedList<>();