class GrpcUtils {

  public static String getInterfaceNameByFullMethodName(String fullMethodName) {
    Preconditions.checkNotNull(fullMethodName, "fullMethodName");

    int index = fullMethodName.indexOf("/");
    if (index < 0) {
      throw new BusinessException("全路径方法名[" + fullMethodName + "]中不含有[/]字符，请检查！");
    }

    return fullMethodName.substring(0, index);
  }

}