/**
* @see org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor#read(javax.xml.stream.XMLStreamReader)
*/
public ErlangBinding read(XMLStreamReader reader)
throws ContributionReadException, XMLStreamException {
ErlangBinding binding = new ErlangBindingImpl();
// Read the policies
policyProcessor.readPolicies(binding, reader);
binding.setNode(reader.getAttributeValue(null, ATTR_NODE));
String mboxValue = reader.getAttributeValue(null, ATTR_MBOX);
if (mboxValue != null && mboxValue.length() > 0) {
try {
binding.setMbox(Boolean.parseBoolean(mboxValue));
} catch (Exception e) {
}
}
try {
binding.setTimeout(Long.parseLong(reader.getAttributeValue(null,
ATTR_TIMEOUT)));
} catch (NumberFormatException e) {
}
binding.setModule(reader.getAttributeValue(null, ATTR_MODULE));
binding.setCookie(reader.getAttributeValue(null, ATTR_COOKIE));
try {
binding.setServiceThreadPool(Integer.parseInt(reader
.getAttributeValue(null, ATTR_SERVICE_THREAD_POOL)));
} catch (NumberFormatException e) {
}
return binding;