code: public static void setDefaultVCConnectionType(VirtualConnection vc) {
          if (vc == null) {
              return;
          }
  
          Map<Object, Object> map = vc.getStateMap();
  
          // Pick defaults for INBOUND/OUTBOUND
          // setVCConnectionType will only set these values in the VC if
          // a type has not been preset.
          if (map.get(CONNECTION_TYPE_VC_KEY) == null) {
              if (vc instanceof InboundVirtualConnection) {
                  map.put(CONNECTION_TYPE_VC_KEY, ConnectionType.INBOUND);
              } else {
                  map.put(CONNECTION_TYPE_VC_KEY, ConnectionType.OUTBOUND);
              }
          }
      }
docs: Assign the default ConnectionType (INBOUND or OUTBOUND) to
  the VirtualConnection.
  
  @param vc
  VirtualConnection to add ConnectionType to