io.infinicast.client.api.paths.HandlerRegistrationOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinicast-client-jdk8 Show documentation
Show all versions of infinicast-client-jdk8 Show documentation
Infinicast SDK to communicate with the cloud.
package io.infinicast.client.api.paths;
import java.util.ArrayList;
public class HandlerRegistrationOptions extends HandlerRegistrationOptionsData {
public HandlerRegistrationOptions() {
}
public HandlerRegistrationOptions stickyOncePerRole() {
super.setIsOncePerRole(true);
super.setIsSticky(true);
return this;
}
public HandlerRegistrationOptions oncePerRole() {
super.setIsOncePerRole(true);
return this;
}
public HandlerRegistrationOptions withSendingEndpointDataContext() {
super.sendingEndpointDataContext = true;
return this;
}
public HandlerRegistrationOptions withDataContext(String path, DataContextRelativeOptions relative) {
if (super.dataContextPaths == null) {
super.dataContextPaths = new ArrayList();
}
DataContextRequest r = new DataContextRequest();
r.path = path;
r.relativeTo = relative;
super.dataContextPaths.add(r);
return this;
}
public HandlerRegistrationOptions withDataContext(String path) {
return this.withDataContext(path, DataContextRelativeOptions.Root);
}
}