use of org.jpos.space.Space in project jPOS by jpos.
the class IncomingListener method setConfiguration.
@SuppressWarnings("unchecked")
public void setConfiguration(Configuration cfg) throws ConfigurationException {
timeout = cfg.getLong("timeout", 15000L);
sp = (Space<String, Context>) SpaceFactory.getSpace(cfg.get("space"));
queue = cfg.get("queue", null);
if (queue == null)
throw new ConfigurationException("queue property not specified");
source = cfg.get("source", ContextConstants.SOURCE.toString());
request = cfg.get("request", ContextConstants.REQUEST.toString());
timestamp = cfg.get("timestamp", ContextConstants.TIMESTAMP.toString());
remote = cfg.getBoolean("remote") || cfg.get("space").startsWith("rspace:");
Map<String, String> m = new HashMap<>();
cfg.keySet().stream().filter(s -> s.startsWith("ctx.")).forEach(s -> m.put(s.substring(4), cfg.get(s)));
if (m.size() > 0)
additionalContextEntries = m;
}
Aggregations