code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private static TransportType map2TransportType(String transportId) {
TransportType type;
if (CXF_HTTP_TRANSPORT_ID.equals(transportId) || SOAP_HTTP_TRANSPORT_ID.equals(transportId)) {
type = TransportType.HTTP;
} else {
type = TransportType.OTHER;
}
return... | java |
private EventTypeEnum getEventType(Message message) {
boolean isRequestor = MessageUtils.isRequestor(message);
boolean isFault = MessageUtils.isFault(message);
boolean isOutbound = MessageUtils.isOutbound(message);
//Needed because if it is rest request and method does not exists had be... | java |
protected String getPayload(Message message) {
try {
String encoding = (String) message.get(Message.ENCODING);
if (encoding == null) {
encoding = "UTF-8";
}
CachedOutputStream cos = message.getContent(CachedOutputStream.class);
if (cos ... | java |
private void handleContentLength(Event event) {
if (event.getContent() == null) {
return;
}
if (maxContentLength == -1 || event.getContent().length() <= maxContentLength) {
return;
}
if (maxContentLength < CUT_START_TAG.length() + CUT_END_TAG.length()) {... | java |
private Map<String, Criteria> getCriterias(Map<String, String[]> params) {
Map<String, Criteria> result = new HashMap<String, Criteria>();
for (Map.Entry<String, String[]> param : params.entrySet()) {
for (Criteria criteria : FILTER_CRITERIAS) {
if (criteria.getName().equals(... | java |
public void setSessionTimeout(int timeout) {
((ZKBackend) getBackend()).setSessionTimeout(timeout);
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Locator session timeout set to: " + timeout);
}
} | java |
public void racRent() {
pos = pos - 1;
String userName = CarSearch.getLastSearchParams()[0];
String pickupDate = CarSearch.getLastSearchParams()[1];
String returnDate = CarSearch.getLastSearchParams()[2];
this.searcher.search(userName, pickupDate, returnDate);
if (searcher!=null && searcher.getCars()!= null... | java |
public void addProperty(String name, String... values) {
List<String> valueList = new ArrayList<String>();
for (String value : values) {
valueList.add(value.trim());
}
properties.put(name.trim(), valueList);
} | java |
protected SingleBusLocatorRegistrar getRegistrar(Bus bus) {
SingleBusLocatorRegistrar registrar = busRegistrars.get(bus);
if (registrar == null) {
check(locatorClient, "serviceLocator", "registerService");
registrar = new SingleBusLocatorRegistrar(bus);
registrar.setS... | java |
public void useXopAttachmentServiceWithWebClient() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments/xop";
JAXRSClientFactoryBean factoryBean = new JAXRSClientFactoryBean();
factoryBean.setAddress(serviceURI);
factoryBean.setProper... | java |
public void useXopAttachmentServiceWithProxy() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments";
XopAttachmentService proxy = JAXRSClientFactory.create(serviceURI,
XopAttachmentServ... | java |
private XopBean createXopBean() throws Exception {
XopBean xop = new XopBean();
xop.setName("xopName");
InputStream is = getClass().getResourceAsStream("/java.jpg");
byte[] data = IOUtils.readBytesFromStream(is);
// Pass java.jpg as an array of bytes
xo... | java |
private void verifyXopResponse(XopBean xopOriginal, XopBean xopResponse) {
if (!Arrays.equals(xopResponse.getBytes(), xopOriginal.getBytes())) {
throw new RuntimeException("Received XOP attachment is corrupted");
}
System.out.println();
System.out.println("XOP attachment has ... | java |
public void setMonitoringService(org.talend.esb.sam.common.service.MonitoringService monitoringService) {
this.monitoringService = monitoringService;
} | java |
private static void throwFault(String code, String message, Throwable t) throws PutEventsFault {
if (LOG.isLoggable(Level.SEVERE)) {
LOG.log(Level.SEVERE, "Throw Fault " + code + " " + message, t);
}
FaultType faultType = new FaultType();
faultType.setFaultCode(code);
... | java |
public void putEvents(List<Event> events) {
Exception lastException;
List<EventType> eventTypes = new ArrayList<EventType>();
for (Event event : events) {
EventType eventType = EventMapper.map(event);
eventTypes.add(eventType);
}
int i = 0;
lastEx... | java |
private EventType createEventType(EventEnumType type) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(new Date()));
eventType.setEventType(type);
OriginatorType origType = new OriginatorType();
origType.setProcessId(Converter.getPID());
... | java |
private void putEvent(EventType eventType) throws Exception {
List<EventType> eventTypes = Collections.singletonList(eventType);
int i;
for (i = 0; i < retryNum; ++i) {
try {
monitoringService.putEvents(eventTypes);
break;
} catch (Excepti... | java |
private boolean checkConfig(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration... | java |
private void initWsClient(BundleContext context) throws Exception {
ServiceReference serviceRef = context.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin cfgAdmin = (ConfigurationAdmin)context.getService(serviceRef);
Configuration config = cfgAdmin.getConfiguration("... | java |
protected void handleResponseOut(T message) throws Fault {
Message reqMsg = message.getExchange().getInMessage();
if (reqMsg == null) {
LOG.warning("InMessage is null!");
return;
}
// No flowId for oneway message
Exchange ex = reqMsg.getExchange();
... | java |
protected void handleRequestOut(T message) throws Fault {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null
&& message.containsKey(PhaseInterceptorChain.PREVIOUS_MESSAGE)) {
// Web Service consumer is acting as an intermediary
@SuppressWarnings("... | java |
protected void handleINEvent(Exchange exchange, String reqFid) throws Fault {
Message inMsg = exchange.getInMessage();
EventProducerInterceptor epi = null;
FlowIdHelper.setFlowId(inMsg, reqFid);
ListIterator<Interceptor<? extends Message>> interceptors = inMsg
.getInter... | java |
public void setDialect(String dialect) {
String[] scripts = createScripts.get(dialect);
createSql = scripts[0];
createSqlInd = scripts[1];
} | java |
public static Event map(EventType eventType) {
Event event = new Event();
event.setEventType(mapEventTypeEnum(eventType.getEventType()));
Date date = (eventType.getTimestamp() == null)
? new Date() : eventType.getTimestamp().toGregorianCalendar().getTime();
event.setTimes... | java |
private static Map<String, String> mapCustomInfo(CustomInfoType ciType){
Map<String, String> customInfo = new HashMap<String, String>();
if (ciType != null){
for (CustomInfoType.Item item : ciType.getItem()) {
customInfo.put(item.getKey(), item.getValue());
}
... | java |
private static String mapContent(DataHandler dh) {
if (dh == null) {
return "";
}
try {
InputStream is = dh.getInputStream();
String content = IOUtils.toString(is);
is.close();
return content;
} catch (IOException e) {
... | java |
private static MessageInfo mapMessageInfo(MessageInfoType messageInfoType) {
MessageInfo messageInfo = new MessageInfo();
if (messageInfoType != null) {
messageInfo.setFlowId(messageInfoType.getFlowId());
messageInfo.setMessageId(messageInfoType.getMessageId());
messa... | java |
private static Originator mapOriginatorType(OriginatorType originatorType) {
Originator originator = new Originator();
if (originatorType != null) {
originator.setCustomId(originatorType.getCustomId());
originator.setHostname(originatorType.getHostname());
originator.... | java |
private static EventTypeEnum mapEventTypeEnum(EventEnumType eventType) {
if (eventType != null) {
return EventTypeEnum.valueOf(eventType.name());
}
return EventTypeEnum.UNKNOWN;
} | java |
public void useNewSOAPService(boolean direct) throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
org.customer.service.CustomerServiceService service =
new org.customer.service.CustomerServiceService(wsdlURL);
org.customer.service.CustomerSe... | java |
public void useNewSOAPServiceWithOldClient() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerServiceNew.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.examp... | java |
public void useNewSOAPServiceWithOldClientAndRedirection() throws Exception {
URL wsdlURL = getClass().getResource("/CustomerService.wsdl");
com.example.customerservice.CustomerServiceService service =
new com.example.customerservice.CustomerServiceService(wsdlURL);
com.exa... | java |
private void addTransformInterceptors(List<Interceptor<?>> inInterceptors,
List<Interceptor<?>> outInterceptors,
boolean newClient) {
// The old service expects the Customer data be qualified with
// the 'http:/... | java |
@SuppressWarnings("unused")
@XmlID
@XmlAttribute(name = "id")
private String getXmlID(){
return String.format("%s-%s", this.getClass().getSimpleName(), Long.valueOf(id));
} | java |
private void stopAllServersAndRemoveCamelContext(CamelContext camelContext) {
log.debug("Stopping all servers associated with {}", camelContext);
List<SingleBusLocatorRegistrar> registrars = locatorRegistrar.getAllRegistars(camelContext);
registrars.forEach(registrar -> registrar.stopAllServersA... | java |
public static EventType map(Event event) {
EventType eventType = new EventType();
eventType.setTimestamp(Converter.convertDate(event.getTimestamp()));
eventType.setEventType(convertEventType(event.getEventType()));
OriginatorType origType = mapOriginator(event.getOriginator());
e... | java |
private static DataHandler getDataHandlerForString(Event event) {
try {
return new DataHandler(new ByteDataSource(event.getContent().getBytes("UTF-8")));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} | java |
private static MessageInfoType mapMessageInfo(MessageInfo messageInfo) {
if (messageInfo == null) {
return null;
}
MessageInfoType miType = new MessageInfoType();
miType.setMessageId(messageInfo.getMessageId());
miType.setFlowId(messageInfo.getFlowId());
miTyp... | java |
private static OriginatorType mapOriginator(Originator originator) {
if (originator == null) {
return null;
}
OriginatorType origType = new OriginatorType();
origType.setProcessId(originator.getProcessId());
origType.setIp(originator.getIp());
origType.setHost... | java |
private static CustomInfoType convertCustomInfo(Map<String, String> customInfo) {
if (customInfo == null) {
return null;
}
CustomInfoType ciType = new CustomInfoType();
for (Entry<String, String> entry : customInfo.entrySet()) {
CustomInfoType.Item cItem = new Cu... | java |
private static EventEnumType convertEventType(org.talend.esb.sam.common.event.EventTypeEnum eventType) {
if (eventType == null) {
return null;
}
return EventEnumType.valueOf(eventType.name());
} | java |
private static QName convertString(String str) {
if (str != null) {
return QName.valueOf(str);
} else {
return null;
}
} | java |
public void logException(Level level) {
if (!LOG.isLoggable(level)) {
return;
}
final StringBuilder builder = new StringBuilder();
builder.append("\n----------------------------------------------------");
builder.append("\nMonitoringException");
builder.append... | java |
private LocatorSelectionStrategy getLocatorSelectionStrategy(String locatorSelectionStrategy) {
if (null == locatorSelectionStrategy) {
return locatorSelectionStrategyMap.get(DEFAULT_STRATEGY).getInstance();
}
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Strate... | java |
@Value("${locator.strategy}")
public void setDefaultLocatorSelectionStrategy(String defaultLocatorSelectionStrategy) {
this.defaultLocatorSelectionStrategy = defaultLocatorSelectionStrategy;
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Default strategy " + defaultLocatorSelecti... | java |
public void enable(ConduitSelectorHolder conduitSelectorHolder, SLPropertiesMatcher matcher,
String selectionStrategy) {
LocatorTargetSelector selector = new LocatorTargetSelector();
selector.setEndpoint(conduitSelectorHolder.getConduitSelector().getEndpoint());
String actualStrateg... | java |
public static void applyWsdlExtensions(Bus bus) {
ExtensionRegistry registry = bus.getExtension(WSDLManager.class).getExtensionRegistry();
try {
JAXBExtensionHelper.addExtensions(registry,
javax.wsdl.Definition.class,
org.talend.esb.mep.requestcallb... | java |
@Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
} | java |
private boolean detectWSAddressingFeature(InterceptorProvider provider, Bus bus) {
//detect on the bus level
if (bus.getFeatures() != null) {
Iterator<Feature> busFeatures = bus.getFeatures().iterator();
while (busFeatures.hasNext()) {
Feature busFeature = busFeat... | java |
private void addWSAddressingInterceptors(InterceptorProvider provider) {
MAPAggregator mapAggregator = new MAPAggregator();
MAPCodec mapCodec = new MAPCodec();
provider.getInInterceptors().add(mapAggregator);
provider.getInInterceptors().add(mapCodec);
provider.getOutIntercepto... | java |
public static String readFlowId(Message message) {
if (!(message instanceof SoapMessage)) {
return null;
}
String flowId = null;
Header hdFlowId = ((SoapMessage)message).getHeader(FLOW_ID_QNAME);
if (hdFlowId != null) {
if (hdFlowId.getObject() instanceof ... | java |
public static void writeFlowId(Message message, String flowId) {
if (!(message instanceof SoapMessage)) {
return;
}
SoapMessage soapMessage = (SoapMessage)message;
Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME);
if (hdFlowId != null) {
LOG.warning(... | java |
public static STSClient createSTSX509Client(Bus bus, Map<String, String> stsProps) {
final STSClient stsClient = createClient(bus, stsProps);
stsClient.setWsdlLocation(stsProps.get(STS_X509_WSDL_LOCATION));
stsClient.setEndpointQName(new QName(stsProps.get(STS_NAMESPACE), stsProps.get(STS_X... | java |
private boolean isSecuredByPolicy(Server server) {
boolean isSecured = false;
EndpointInfo ei = server.getEndpoint().getEndpointInfo();
PolicyEngine pe = bus.getExtension(PolicyEngine.class);
if (null == pe) {
LOG.finest("No Policy engine found");
return isSecur... | java |
private boolean isSecuredByProperty(Server server) {
boolean isSecured = false;
Object value = server.getEndpoint().get("org.talend.tesb.endpoint.secured"); //Property name TBD
if (value instanceof String) {
try {
isSecured = Boolean.valueOf((String) value);
... | java |
private void writeCustomInfo(Event event) {
// insert customInfo (key/value) into DB
for (Map.Entry<String, String> customInfo : event.getCustomInfo().entrySet()) {
long cust_id = dbDialect.getIncrementer().nextLongValue();
getJdbcTemplate()
.update("insert into E... | java |
private Map<String, String> readCustomInfo(long eventId) {
List<Map<String, Object>> rows = getJdbcTemplate()
.queryForList("select * from EVENTS_CUSTOMINFO where EVENT_ID=" + eventId);
Map<String, String> customInfo = new HashMap<String, String>(rows.size());
for (Map<String, Object... | java |
private String toSQLPattern(String attribute) {
String pattern = attribute.replace("*", "%");
if (!pattern.startsWith("%")) {
pattern = "%" + pattern;
}
if (!pattern.endsWith("%")) {
pattern = pattern.concat("%");
}
return pattern;
} | java |
private void checkMessageID(Message message) {
if (!MessageUtils.isOutbound(message)) return;
AddressingProperties maps =
ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message));
if (maps == null) {
maps = new AddressingProperties();
}
... | java |
public static String getCorrelationId(Message message) {
String correlationId = (String) message.get(CORRELATION_ID_KEY);
if(null == correlationId) {
correlationId = readCorrelationId(message);
}
if(null == correlationId) {
correlationId = readCorrelationIdSoap(me... | java |
public static String readCorrelationId(Message message) {
String correlationId = null;
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
List<String> correlationIds = headers.get(CORRELATION_ID_KEY);
if (correlationIds != null && correlationIds.size() > 0) {
... | java |
private static Map<String, List<String>> getOrCreateProtocolHeader(
Message message) {
Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) message
.get(Message.PROTOCOL_HEADERS));
if (headers == null) {
headers = new HashMap<String, List<String>>();
... | java |
public void putEvents(List<Event> events) {
List<Event> filteredEvents = filterEvents(events);
executeHandlers(filteredEvents);
for (Event event : filteredEvents) {
persistenceHandler.writeEvent(event);
}
} | java |
private List<Event> filterEvents(List<Event> events) {
List<Event> filteredEvents = new ArrayList<Event>();
for (Event event : events) {
if (!filter(event)) {
filteredEvents.add(event);
}
}
return filteredEvents;
} | java |
public boolean filter(Event event) {
LOG.info("StringContentFilter called");
if (wordsToFilter != null) {
for (String filterWord : wordsToFilter) {
if (event.getContent() != null
&& -1 != event.getContent().indexOf(filterWord)) {
... | java |
public String checkIn(byte[] data) {
String id = UUID.randomUUID().toString();
dataMap.put(id, data);
return id;
} | java |
private static void setupFlowId(SoapMessage message) {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null) {
flowId = FlowIdProtocolHeaderCodec.readFlowId(message);
}
if (flowId == null) {
flowId = FlowIdSoapCodec.readFlowId(message);
}
... | java |
private static X509Certificate getReqSigCert(Message message) {
List<WSHandlerResult> results =
CastUtils.cast((List<?>)
message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS));
if (results == null) {
return null;
}
/*
... | java |
private void useSearchService() throws Exception {
System.out.println("Searching...");
WebClient wc = WebClient.create("http://localhost:" + port + "/services/personservice/search");
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
wc.accept(MediaType.... | java |
public void useSimpleProxy() {
String webAppAddress = "http://localhost:" + port + "/services/personservice";
PersonService proxy = JAXRSClientFactory.create(webAppAddress, PersonService.class);
new PersonServiceProxyClient(proxy).useService();
} | java |
public static String readCorrelationId(Message message) {
if (!(message instanceof SoapMessage)) {
return null;
}
String correlationId = null;
Header hdCorrelationId = ((SoapMessage) message).getHeader(CORRELATION_ID_QNAME);
if (hdCorrelationId != null) {
... | java |
public static void writeCorrelationId(Message message, String correlationId) {
if (!(message instanceof SoapMessage)) {
return;
}
SoapMessage soapMessage = (SoapMessage) message;
Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME);
if (hdCorrelationId... | java |
public void handleEvent(Event event) {
LOG.fine("ContentLengthHandler called");
//if maximum length is shorter then <cut><![CDATA[ ]]></cut> it's not possible to cut the content
if(CUT_START_TAG.length() + CUT_END_TAG.length() > length) {
LOG.warning("Trying to cut content. But leng... | java |
public static XMLGregorianCalendar convertDate(Date date) {
if (date == null) {
return null;
}
GregorianCalendar gc = new GregorianCalendar();
gc.setTimeInMillis(date.getTime());
try {
return getDatatypeFactory().newXMLGregorianCalendar(gc);
} c... | java |
public static CustomInfo getOrCreateCustomInfo(Message message) {
CustomInfo customInfo = message.get(CustomInfo.class);
if (customInfo == null) {
customInfo = new CustomInfo();
message.put(CustomInfo.class, customInfo);
}
return customInfo;
} | java |
public static boolean isMessageContentToBeLogged(final Message message, final boolean logMessageContent,
boolean logMessageContentOverride) {
/*
* If controlling of logging behavior is not allowed externally
* then log according to global property value
*/
if (!lo... | java |
public void initLocator() throws InterruptedException,
ServiceLocatorException {
if (locatorClient == null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Instantiate locatorClient client for Locator Server "
+ locatorEndpoints + "...");
... | java |
@PreDestroy
public void disconnectLocator() throws InterruptedException,
ServiceLocatorException {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Destroy Locator client");
}
if (endpointCollector != null) {
endpointCollector.stopScheduledCollection();
... | java |
List<W3CEndpointReference> lookupEndpoints(QName serviceName,
MatcherDataType matcherData) throws ServiceLocatorFault,
InterruptedExceptionFault {
SLPropertiesMatcher matcher = createMatcher(matcherData);
List<String> names = null;
List<W3CEndpointReference> result = new ... | java |
private List<String> getRotatedList(List<String> strings) {
int index = RANDOM.nextInt(strings.size());
List<String> rotated = new ArrayList<String>();
for (int i = 0; i < strings.size(); i++) {
rotated.add(strings.get(index));
index = (index + 1) % strings.size();
... | java |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new MultiInstanceWorkloadStrategy(factory, name, arguments, endpointRegistry, execService));
}
} | java |
protected void processStart(Endpoint endpoint, EventTypeEnum eventType) {
if (!sendLifecycleEvent) {
return;
}
Event event = createEvent(endpoint, eventType);
queue.add(event);
} | java |
protected void processStop(Endpoint endpoint, EventTypeEnum eventType) {
if (!sendLifecycleEvent) {
return;
}
Event event = createEvent(endpoint, eventType);
monitoringServiceClient.putEvents(Collections.singletonList(event));
if (LOG.isLoggable(Level.INFO)) {
... | java |
private Event createEvent(Endpoint endpoint, EventTypeEnum type) {
Event event = new Event();
MessageInfo messageInfo = new MessageInfo();
Originator originator = new Originator();
event.setMessageInfo(messageInfo);
event.setOriginator(originator);
Date date = new Date(... | java |
public void useOldRESTService() throws Exception {
List<Object> providers = createJAXRSProviders();
com.example.customerservice.CustomerService customerService = JAXRSClientFactory
.createFromModel("http://localhost:" + port + "/examples/direct/rest",
com.examp... | java |
public void useNewRESTService(String address) throws Exception {
List<Object> providers = createJAXRSProviders();
org.customer.service.CustomerService customerService = JAXRSClientFactory
.createFromModel(address,
org.customer.service.CustomerService.class,
... | java |
public void useNewRESTServiceWithOldClient() throws Exception {
List<Object> providers = createJAXRSProviders();
com.example.customerservice.CustomerService customerService = JAXRSClientFactory
.createFromModel("http://localhost:" + port + "/examples/direct/new-rest",
... | java |
@PostConstruct
public void init() {
//init Bus and LifeCycle listeners
if (bus != null && sendLifecycleEvent ) {
ServerLifeCycleManager slcm = bus.getExtension(ServerLifeCycleManager.class);
if (null != slcm) {
ServiceListenerImpl svrListener = new... | java |
public void setDefaultInterval(long defaultInterval) {
if(defaultInterval <= 0) {
LOG.severe("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval);
throw new IllegalArgumentException("collector.scheduler.interval must be greater than ... | java |
public void sendEventsFromQueue() {
if (null == queue || stopSending) {
return;
}
LOG.fine("Scheduler called for sending events");
int packageSize = getEventsPerMessageCall();
while (!queue.isEmpty()) {
final List<Event> list = new ArrayList<Event>();
... | java |
private void sendEvents(final List<Event> events) {
if (null != handlers) {
for (EventHandler current : handlers) {
for (Event event : events) {
current.handleEvent(event);
}
}
}
LOG.info("Put events(" + events.size() +... | java |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService));
}
} | java |
public static void writeCorrelationId(Message message, String correlationId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HT... | java |
public static String readFlowId(Message message) {
String flowId = null;
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
List<String> flowIds = headers.get(FLOWID_HTTP_HEADER_NAME);
if (flowIds != null && flowIds.size() > 0) {
flowId = flowIds.get(0);
... | java |
public static void writeFlowId(Message message, String flowId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + FLOWID_HTTP_H... | java |
public static void addInterceptors(InterceptorProvider provider) {
PhaseManager phases = BusFactory.getDefaultBus().getExtension(PhaseManager.class);
for (Phase p : phases.getInPhases()) {
provider.getInInterceptors().add(new DemoInterceptor(p.getName()));
provider.getInFaultInte... | java |
private boolean somethingMayHaveChanged(PhaseInterceptorChain pic) {
Iterator<Interceptor<? extends Message>> it = pic.iterator();
Interceptor<? extends Message> last = null;
while (it.hasNext()) {
Interceptor<? extends Message> cur = it.next();
if (cur == this) {
... | java |
public void printInterceptorChain(InterceptorChain chain) {
Iterator<Interceptor<? extends Message>> it = chain.iterator();
String phase = "";
StringBuilder builder = null;
while (it.hasNext()) {
Interceptor<? extends Message> interceptor = it.next();
if (intercep... | java |
public com.squareup.okhttp.Call getCharactersCharacterIdShipCall(Integer characterId, String datasource,
String ifNoneMatch, String token, final ApiCallback callback) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
String localVarPath =... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.