{
ref.handled();
ServerMessage message = ref.getMessage();
StatusUpdate status = new StatusUpdate(message.getBodyBuffer().readString());
// set optional property
if (message.containsProperty(TwitterConstants.KEY_IN_REPLY_TO_STATUS_ID))
{
status.setInReplyToStatusId(message.getLongProperty(TwitterConstants.KEY_IN_REPLY_TO_STATUS_ID));
}
if (message.containsProperty(TwitterConstants.KEY_GEO_LOCATION_LATITUDE))
{
double geolat = message.getDoubleProperty(TwitterConstants.KEY_GEO_LOCATION_LATITUDE);
double geolong = message.getDoubleProperty(TwitterConstants.KEY_GEO_LOCATION_LONGITUDE);
status.setLocation(new GeoLocation(geolat, geolong));
}
if (message.containsProperty(TwitterConstants.KEY_PLACE_ID))
{
status.setPlaceId(message.getStringProperty(TwitterConstants.KEY_PLACE_ID));
}
if (message.containsProperty(TwitterConstants.KEY_DISPLAY_COODINATES))
{
status.setDisplayCoordinates(message.getBooleanProperty(TwitterConstants.KEY_DISPLAY_COODINATES));
}
// send to Twitter
try
{