public DataHandler remove(Object key) { DataHandler attachment = message.getOutboundAttachment(key.toString()); try { message.removeOutboundAttachment(key.toString()); } catch (Exception e) { //ignore (some message types may throw an exception if the attachment does not exist) } return attachment; }
@Override public void processMatch(String matchedValue) { try { message.removeOutboundAttachment(matchedValue); } catch (Exception e) { throw new MuleRuntimeException(e); } } });
@Override public DataHandler remove(Object key) { if (!(key instanceof String)) { return null; } DataHandler previousValue = get(key); try { message.removeOutboundAttachment((String) key); } catch (Exception e) { throw new RuntimeException(e); } return previousValue; }
public DataHandler removeAttachment(String name) { DataHandler dh = message.getOutboundAttachment(name); try { if(dh!=null) message.removeOutboundAttachment(name); } catch (Exception e) { throw new MuleRuntimeException(e); } return dh; }
message.removeOutboundAttachment(name);