Class ElasticSearchConnection

    • Constructor Detail

      • ElasticSearchConnection

        protected ElasticSearchConnection​(ElasticSearchConfig config,
                                          org.apache.http.client.HttpClient client)
    • Method Detail

      • getApiUrl

        protected java.lang.StringBuffer getApiUrl​(java.lang.String command,
                                                   boolean checkConnection)
                                            throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
      • call

        protected boolean call​(org.apache.http.client.methods.HttpRequestBase method)
                        throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                               org.apache.manifoldcf.agents.interfaces.ServiceInterruption
        Call ElasticSearch.
        Returns:
        false if there was a "rejection".
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        org.apache.manifoldcf.agents.interfaces.ServiceInterruption
      • handleResultCode

        protected boolean handleResultCode​(int code,
                                           java.lang.String response)
                                    throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                                           org.apache.manifoldcf.agents.interfaces.ServiceInterruption
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        org.apache.manifoldcf.agents.interfaces.ServiceInterruption
      • handleHttpException

        protected void handleHttpException​(org.apache.http.HttpException e)
                                    throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                                           org.apache.manifoldcf.agents.interfaces.ServiceInterruption
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        org.apache.manifoldcf.agents.interfaces.ServiceInterruption
      • handleIOException

        protected void handleIOException​(java.io.IOException e)
                                  throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                                         org.apache.manifoldcf.agents.interfaces.ServiceInterruption
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        org.apache.manifoldcf.agents.interfaces.ServiceInterruption
      • checkJson

        protected java.lang.String checkJson​(java.lang.String jsonQuery)
                                      throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
      • getResultDescription

        public java.lang.String getResultDescription()
      • getResponse

        protected java.lang.String getResponse()
      • getCallUrlSnippet

        public java.lang.String getCallUrlSnippet()
      • getResultCode

        public java.lang.String getResultCode()
      • setResultCode

        public void setResultCode​(java.lang.String resultCode)