
io.scalecube.services.ServiceMethodDefinition Maven / Gradle / Ivy
package io.scalecube.services;
import java.util.Collections;
import java.util.Map;
/**
* A Service Method Definition is a single method definition of a service inside service
* registration.
*/
public class ServiceMethodDefinition {
private String action;
private Map tags;
/**
* Constructor for SerDe.
*
* @deprecated exposed only for de/serialization purpose.
*/
public ServiceMethodDefinition() {}
/**
* Create a new Service Method Definition.
*
* @param action method name
*/
public ServiceMethodDefinition(String action) {
this(action, Collections.emptyMap());
}
/**
* Create a new Service Method Definition.
*
* @param action method name
* @param tags tags of this method
*/
public ServiceMethodDefinition(String action, Map tags) {
this.action = action;
this.tags = tags;
}
/**
* a generic definition for method name.
*
* @return the method name
*/
public String getAction() {
return action;
}
public ServiceMethodDefinition setAction(String action) {
this.action = action;
return this;
}
public Map getTags() {
return tags;
}
public ServiceMethodDefinition setTags(Map tags) {
this.tags = tags;
return this;
}
@Override
public String toString() {
return "ServiceMethodDefinition{" + "action='" + action + '\'' + ", tags=" + tags + '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy