
edu.stanford.protege.webprotege.gateway.Msg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webprotege-gwt-api-gateway Show documentation
Show all versions of webprotege-gwt-api-gateway Show documentation
The API Gateway for the WebProtégé GWT User Interface
The newest version!
package edu.stanford.protege.webprotege.gateway;
import java.nio.charset.StandardCharsets;
import java.util.Map;
/**
* Matthew Horridge
* Stanford Center for Biomedical Informatics Research
* 2022-03-29
*/
public record Msg(byte [] payload, Map headers) {
public static Msg withHeader(String key, String value) {
return new Msg(new byte[0], Map.of(key, value));
}
public static Msg withPayload(String s) {
return new Msg(s.getBytes(StandardCharsets.UTF_8), Map.of());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy