@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  sb.append(clientId);
  sb.append("\n ");
switch (status) {
case CONNECTED:
    sb.append(context.getString(R.string.connection_connected_to));
  break;
case DISCONNECTED:
sb.append(context.getString(R.string.connection_disconnected_from));
break;
case NONE:
sb.append(context.getString(R.string.connection_unknown_status));
break;
case CONNECTING:
sb.append(context.getString(R.string.connection_connecting_to));
break;
case DISCONNECTING:
sb.append(context.getString(R.string.connection_disconnecting_from));
break;
case ERROR:
sb.append(context.getString(R.string.connection_error_connecting_to));
}
sb.append(" ");
sb.append(host);
return sb.toString();
}

@ Override public String toString ( ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( clientId ) ; sb . append ( "\n " ) ; switch ( status ) { case CONNECTED : sb . append ( context . getString ( R . string . connection_connected_to ) ) ; break ; case DISCONNECTED : sb . append ( context . getString ( R . string . connection_disconnected_from ) ) ; break ; case NONE : sb . append ( context . getString ( R . string . connection_unknown_status ) ) ; break ; case CONNECTING : sb . append ( context . getString ( R . string . connection_connecting_to ) ) ; break ; case DISCONNECTING : sb . append ( context . getString ( R . string . connection_disconnecting_from ) ) ; break ; case ERROR : sb . append ( context . getString ( R . string . connection_error_connecting_to ) ) ; } sb . append ( " " ) ; sb . append ( host ) ; return sb . toString ( ) ; }
a string representing the state of the client this connection object represents
