code: public static String getConnectionEventString(int eventID) {
          switch (eventID) {
  
              case ConnectionEvent.CONNECTION_CLOSED: 
                  return "CONNECTION CLOSED (" + eventID + ')'; 
  
              case ConnectionEvent.LOCAL_TRANSACTION_STARTED: 
                  return "LOCAL TRANSACTION STARTED (" + eventID + ')'; 
  
              case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED: 
                  return "LOCAL TRANSACTION COMMITTED (" + eventID + ')'; 
  
              case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK: 
                  return "LOCAL TRANSACTION ROLLEDBACK (" + eventID + ')'; 
  
              case ConnectionEvent.CONNECTION_ERROR_OCCURRED: 
                  return "CONNECTION ERROR OCCURRED (" + eventID + ')'; 
  
              case WSConnectionEvent.CONNECTION_ERROR_OCCURRED_NO_EVENT:
                  return "CONNECTION ERROR OCCURRED NO EVENT (" + eventID + ')';
  
              case WSConnectionEvent.SINGLE_CONNECTION_ERROR_OCCURRED:
                  return "SINGLE CONNECTION ERROR OCCURRED (" + eventID + ')';
          }
  
          return "UNKNOWN CONNECTION EVENT CONSTANT (" + eventID + ')'; 
      }
docs: Display the name of the ConnectionEvent constant given the event id.
  
  @param eventID a valid ConnectionEvent constant value.
  
  @return The name of the ConnectionEvent constant, or a string indicating the constant
  is unknown.