@Override public int hashCode() { int result = HashCodeUtil.SEED; result = HashCodeUtil.hash(result, wsEclDirectServiceSoapProxy.getEndpoint()); result = HashCodeUtil.hash( result, ((Stub) wsEclDirectServiceSoapProxy.getEclDirectServiceSoap()).getUsername()); result = HashCodeUtil.hash( result, ((Stub) wsEclDirectServiceSoapProxy.getEclDirectServiceSoap()).getPassword()); return result; }
/** * Submit given ECL query for compilation/execution on a given target cluster * * @param ecl - The ecl query * @param targetcluster - The target cluster on which to compile/execute * @param resultLimit - Query results will be limited to this value * @param maxwait - Maxwait in millis * @return - If successfully submited, the resulting Dataset(s). * @throws Exception - Caller must handle exceptions */ public String submitECLandGetResults(WorkunitInfo wu) throws Exception { String results = null; if (wsEclDirectServiceSoapProxy == null) throw new Exception("wsECLDirectServiceSoapProxy not available"); else { RunEclExRequest runeclexreqparams = new RunEclExRequest(); if (wu.getCluster() != null && wu.getCluster().length() > 0) runeclexreqparams.setCluster(wu.getCluster()); runeclexreqparams.setEclText(wu.getECL()); runeclexreqparams.setIncludeGraphs(false); runeclexreqparams.setIncludeResults(true); // RunEclExFormat.None // RunEclExFormat.Table // RunEclExFormat.Xml // RunEclExFormat.ExtendedXml runeclexreqparams.setFormat(RunEclExFormat.None); runeclexreqparams.setWait(wu.getMaxMonitorMillis()); runeclexreqparams.setResultLimit(wu.getResultLimit()); RunEclExResponse runEclExResponse = wsEclDirectServiceSoapProxy.runEclEx(runeclexreqparams); ECLDirectException[] directExceptions = runEclExResponse.getErrors(); if (directExceptions != null && directExceptions.length > 0) { for (ECLDirectException exception : directExceptions) { String severity = exception.getSeverity(); if (severity.equalsIgnoreCase("ERROR")) throw new Exception(exception.getMessage()); } } results = runEclExResponse.getResults(); } return results; }
@Override public boolean equals(Object aThat) { if (this == aThat) { return true; } if (!(aThat instanceof HPCCECLDirectClient)) { return false; } HPCCECLDirectClient that = (HPCCECLDirectClient) aThat; EclDirectServiceSoapProxy thatSoapProxy; try { thatSoapProxy = that.getSoapProxy(); } catch (Exception e) { thatSoapProxy = null; } return EqualsUtil.areEqual( wsEclDirectServiceSoapProxy.getEndpoint(), thatSoapProxy.getEndpoint()) && EqualsUtil.areEqual( ((Stub) wsEclDirectServiceSoapProxy.getEclDirectServiceSoap()).getUsername(), ((Stub) thatSoapProxy.getEclDirectServiceSoap()).getUsername()) && EqualsUtil.areEqual( ((Stub) wsEclDirectServiceSoapProxy.getEclDirectServiceSoap()).getPassword(), ((Stub) thatSoapProxy.getEclDirectServiceSoap()).getPassword()); }
/** * Initializes the service's underlying soap proxy. Should only be used by constructors * * @param baseURL Target service base URL * @param user User credentials * @param pass User credentials */ private void initWsEclDirectServiceSoapProxy(String baseURL, String user, String pass) { wsEclDirectServiceSoapProxy = new EclDirectServiceSoapProxy(baseURL); if (wsEclDirectServiceSoapProxy != null) { EclDirectServiceSoap wsEclDirectServiceSoap = wsEclDirectServiceSoapProxy.getEclDirectServiceSoap(); if (wsEclDirectServiceSoap != null) { if (user != null && pass != null) Connection.initStub((Stub) wsEclDirectServiceSoap, user, pass); } } }