io.castle.client.model.CastleHeaders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of castle-java Show documentation
Show all versions of castle-java Show documentation
Castle adds real-time monitoring of your authentication stack, instantly notifying you and your users
on potential account hijacks.
package io.castle.client.model;
import java.util.ArrayList;
import java.util.List;
public class CastleHeaders {
private List headers;
public List getHeaders() {
return headers;
}
public static Builder builder() {
return new Builder(new CastleHeaders());
}
public void setHeaders(List headers) {
this.headers = headers;
}
@Override
public String toString() {
return "CastleHeaders{" +
"headers=" + headers +
'}';
}
public static class Builder {
private CastleHeaders headers;
private ArrayList headerList;
public Builder(CastleHeaders headers) {
this.headers = headers;
this.headerList = new ArrayList<>();
}
public CastleHeaders build() {
headers.setHeaders(headerList);
return headers;
}
public Builder add(String key, String value) {
this.headerList.add(new CastleHeader(key, value));
return self();
}
private Builder self() {
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy