/** * sets a key value to Boolean.TRUE * * @param key */ public void set(String key) { put(key, Boolean.TRUE); }
public void setOriginReportedDuration(int duration) { put("_originReportedDuration", duration); } public int getOriginReportedDuration()
static RequestStat putInSessionContext(RequestStat stat, SessionContext context) { context.put(SESSION_CONTEXT_KEY, stat); return stat; }
/** * Sets throwable to use for generating a response in the Error endpoint. * * @param th */ public void setError(Throwable th) { put("_error", th); }
public void setEndpoint(String endpoint) { put(KEY_ENDPOINT, endpoint); } public String getEndpoint()
public void setErrorEndpoint(String name) { put("_error-endpoint", name); }
public SessionContext() { // Use a higher than default initial capacity for the hashmap as we generally have more than the default // 16 entries. super(INITIAL_SIZE); put(KEY_FILTER_EXECS, new StringBuilder()); put(KEY_EVENT_PROPS, new HashMap<String, Object>()); put(KEY_FILTER_ERRORS, new ArrayList<FilterError>()); }
/** * Sets throwable to use for generating a response in the Error endpoint. * * @param th */ public void setError(Throwable th) { put("_error", th); }
static RequestStat putInSessionContext(RequestStat stat, SessionContext context) { context.put(SESSION_CONTEXT_KEY, stat); return stat; }
/** * sets a key value to Boolean.TRUE * * @param key */ public void set(String key) { put(key, Boolean.TRUE); }
public void setEndpoint(String endpoint) { put(KEY_ENDPOINT, endpoint); } public String getEndpoint()
/** * puts the key, value into the map. a null value will remove the key from the map * * @param key * @param value */ public void set(String key, Object value) { if (value != null) put(key, value); else remove(key); }
protected final AtomicInteger initRunningFilterIndex(I zuulMesg) { final AtomicInteger idx = new AtomicInteger(0); zuulMesg.getContext().put(RUNNING_FILTER_IDX_SESSION_CTX_KEY, idx); return idx; }
public void setOriginReportedDuration(int duration) { put("_originReportedDuration", duration); } public int getOriginReportedDuration()
public void setErrorEndpoint(String name) { put("_error-endpoint", name); }
public SessionContext() { // Use a higher than default initial capacity for the hashmap as we generally have more than the default // 16 entries. super(INITIAL_SIZE); put(KEY_FILTER_EXECS, new StringBuilder()); put(KEY_EVENT_PROPS, new HashMap<String, Object>()); put(KEY_FILTER_ERRORS, new ArrayList<FilterError>()); }
/** * puts the key, value into the map. a null value will remove the key from the map * * @param key * @param value */ public void set(String key, Object value) { if (value != null) put(key, value); else remove(key); }
protected final AtomicInteger initRunningFilterIndex(I zuulMesg) { final AtomicInteger idx = new AtomicInteger(0); zuulMesg.getContext().put(RUNNING_FILTER_IDX_SESSION_CTX_KEY, idx); return idx; }
protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) { if (flag) { zuulMesg.getContext().put(AWAITING_BODY_FLAG_SESSION_CTX_KEY, Boolean.TRUE); } else { zuulMesg.getContext().remove(AWAITING_BODY_FLAG_SESSION_CTX_KEY); } }
protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) { if (flag) { zuulMesg.getContext().put(AWAITING_BODY_FLAG_SESSION_CTX_KEY, Boolean.TRUE); } else { zuulMesg.getContext().remove(AWAITING_BODY_FLAG_SESSION_CTX_KEY); } }