/** {@inheritDoc} */ public void release() { adapter.release(); if (originalAdapter != null) { originalAdapter.release(); } cache = null; appliedTransformerHashCodes.clear(); }
protected void doSetUp() throws Exception { super.doSetUp(); parser = new SimpleFilenameParser(); adapter = new DefaultMessageAdapter("hello"); adapter.setProperty("foo", "bar"); adapter.setProperty(FileConnector.PROPERTY_ORIGINAL_FILENAME, "originalName"); adapter.setProperty(FileConnector.PROPERTY_FILENAME, "newName"); }
public DefaultMuleMessage(Object message, MessageAdapter previous) { if (message instanceof MessageAdapter) { adapter = (MessageAdapter) message; ((ThreadSafeAccess) adapter).resetAccessControl(); } else { adapter = new DefaultMessageAdapter(message, previous); } if (previous.getExceptionPayload() != null) { setExceptionPayload(previous.getExceptionPayload()); } setEncoding(previous.getEncoding()); if (previous.getAttachmentNames().size() > 0) { Set<String> attNames = adapter.getAttachmentNames(); for (String s : attNames) { try { addAttachment(s, adapter.getAttachment(s)); } catch (Exception e) { throw new MuleRuntimeException(CoreMessages.failedToReadAttachment(s), e); } } } resetAccessControl(); }
/** {@inheritDoc} */ public DataHandler getAttachment(String name) { return adapter.getAttachment(name); }
/** {@inheritDoc} */ public void removeAttachment(String name) throws Exception { adapter.removeAttachment(name); }
/** {@inheritDoc} */ public void setIntProperty(String name, int value) { adapter.setIntProperty(name, value); }
/** {@inheritDoc} */ public Object getPayload() { return adapter.getPayload(); }
/** {@inheritDoc} */ public void addProperties(Map properties, PropertyScope scope) { adapter.addProperties(properties, scope); }
/** {@inheritDoc} */ public void setStringProperty(String name, String value) { adapter.setStringProperty(name, value); }
/** {@inheritDoc} */ public void setEncoding(String encoding) { adapter.setEncoding(encoding); }
/** {@inheritDoc} */ public int getCorrelationGroupSize() { return adapter.getCorrelationGroupSize(); }
/** {@inheritDoc} */ public void setCorrelationSequence(int sequence) { adapter.setCorrelationSequence(sequence); }
/** {@inheritDoc} */ public int getCorrelationSequence() { return adapter.getCorrelationSequence(); }
/** {@inheritDoc} */ public Object getReplyTo() { return adapter.getReplyTo(); }
/** {@inheritDoc} */ public void setReplyTo(Object replyTo) { adapter.setReplyTo(replyTo); }
/** {@inheritDoc} */ public String getCorrelationId() { return adapter.getCorrelationId(); }
/** {@inheritDoc} */ public void setCorrelationId(String id) { adapter.setCorrelationId(id); }
/** {@inheritDoc} */ public Set getAttachmentNames() { return adapter.getAttachmentNames(); }
/** {@inheritDoc} */ public String getEncoding() { return adapter.getEncoding(); }
/** {@inheritDoc} */ public int getCorrelationGroupSize() { return adapter.getCorrelationGroupSize(); } // ** {@inheritDoc} */ public void setCorrelationGroupSize(int size) { adapter.setCorrelationGroupSize(size); }
/** {@inheritDoc} */ public String getStringProperty(String name, String defaultValue) { return adapter.getStringProperty(name, defaultValue); }
/** {@inheritDoc} */ public ExceptionPayload getExceptionPayload() { return adapter.getExceptionPayload(); }
/** {@inheritDoc} */ public void addProperties(Map properties) { adapter.addProperties(properties); }
/** {@inheritDoc} */ public void setExceptionPayload(ExceptionPayload exceptionPayload) { adapter.setExceptionPayload(exceptionPayload); }
/** {@inheritDoc} */ public void clearProperties() { adapter.clearProperties(); }
/** {@inheritDoc} */ public boolean getBooleanProperty(String name, boolean defaultValue) { return adapter.getBooleanProperty(name, defaultValue); }
/** {@inheritDoc} */ public String toString() { return adapter.toString(); }
/** {@inheritDoc} */ public void setBooleanProperty(String name, boolean value) { adapter.setBooleanProperty(name, value); }
/** {@inheritDoc} */ public void addAttachment(String name, DataHandler dataHandler) throws Exception { adapter.addAttachment(name, dataHandler); }
/** {@inheritDoc} */ public int getIntProperty(String name, int defaultValue) { return adapter.getIntProperty(name, defaultValue); }