@SuppressWarnings("unchecked")
public void parse(DeploymentUnit unit, Object dataObject) throws DeploymentUnitProcessingException {
Map<String, ?> data = (Map<String, Map<String, ?>>) dataObject;
StompApplicationMetaData stompAppMetaData = new StompApplicationMetaData();
unit.putAttachment( StompApplicationMetaData.ATTACHMENT_KEY, stompAppMetaData );
Object hosts = data.get( "host" );
if (hosts != null) {
if (hosts instanceof List) {
List<String> list = (List<String>) hosts;
for (String each : list) {
stompAppMetaData.addHost( each );
}
} else {
stompAppMetaData.addHost( (String) hosts );
}
}
stompAppMetaData.setContextPath( (String) data.get( "context" ) );
Map<String, Map<String, ?>> stomplets = (Map<String, Map<String, ?>>) data.get( "stomplets" );
if (stomplets != null) {
for (String name : stomplets.keySet()) {