THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
ServiceCallInterceptor security = (mtd, args, ctx) -> { if (!CustomSecurityProvider.get().checkPermissions(mtd, ctx.value("sessionId"))) throw new SecurityException("Method invocation is not permitted"); return null; } ServiceCallInterceptor audit = (mtd, args, ctx) -> { return (res, err) -> { AuditProvider.get().recordEvent(mtd, ctx.value("sessionId"), err); } } ServiceConfiguration svcCfg = new ServiceConfiguration() .setName("service") .setService(new MyServiceImpl()) .setMaxPerNodeCount(1) .setInterceptors(Arrays.asList(security, audit)); // Deploy service. ignite.services().deploy(svcCfg); ... // Set context parameters for service proxy. MyService proxy = ignite.services().serviceProxy("service", MyService.class, false, Collections.singletonMap("sessionId", sessionId), 0); // A business method call to be intercepted. proxy.placeOrder(order1); proxy.placeOrder(order2); |
// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.
...