public EventSubscriptionImpl(org.eclipse.che.api.core.notification.dto.EventSubscription origin) { this.method = origin.getMethod(); java.util.Map<java.lang.String, java.lang.String> scopeIn = origin.getScope(); if (scopeIn != null) { java.util.Map<java.lang.String, java.lang.String> scopeOut = new java.util.HashMap<java.lang.String, java.lang.String>(); for (java.util.Map.Entry<String, java.lang.String> entry0 : scopeIn.entrySet()) { java.lang.String scopeIn_ = entry0.getValue(); scopeOut.put(entry0.getKey(), scopeIn_); } this.scope = scopeOut; } }
private void consumeUnSubscriptionRequest( String endpointId, EventSubscription eventSubscription) { remoteSubscriptionStorage.removeSubscription(eventSubscription.getMethod(), endpointId); }
public void subscribe(String endpointId, String method, Map<String, String> scope) { requestTransmitter .newRequest() .endpointId(endpointId) .methodName("subscribe") .paramsAsDto( dtoFactory.createDto(EventSubscription.class).withMethod(method).withScope(scope)) .sendAndSkipResult(); }
public void unSubscribe(String endpointId, String method, Map<String, String> scope) { requestTransmitter .newRequest() .endpointId(endpointId) .methodName("unSubscribe") .paramsAsDto( dtoFactory.createDto(EventSubscription.class).withMethod(method).withScope(scope)) .sendAndSkipResult(); } }