Example usage for java.rmi RemoteException getMessage

List of usage examples for java.rmi RemoteException getMessage

Introduction

In this page you can find the example usage for java.rmi RemoteException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message, including the message from the cause, if any, of this exception.

Usage

From source file:org.webcurator.core.harvester.agent.HarvestAgentSOAPClient.java

/**
  * @see org.webcurator.core.harvester.agent.HarvestAgent#purgeAbortedTargetInstances(String[])
  *//*from w ww  . j a  va  2  s  . com*/
public void purgeAbortedTargetInstances(String[] targetInstanceNames) {

    try {
        WCTSoapCall call = new WCTSoapCall(host, port, service, "purgeAbortedTargetInstances");
        call.invoke((Object) targetInstanceNames);
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke purgeAbortedTargetInstances on the SOAP service : " + e.getMessage(),
                    e);
        }
        throw new WCTRuntimeException(
                "Failed to invoke purgeAbortedTargetInstances on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call purgeAbortedTargetInstances : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to create the SOAP call purgeAbortedTargetInstances : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public List<String> listLogFiles(String aJob) {
    try {/* ww w . jav a  2  s  .  c o m*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "listLogFiles");
        Object[] data = { aJob };

        List<String> files = new ArrayList<String>();
        Object[] objs = (Object[]) call.invoke(data);
        for (int i = 0; i < objs.length; i++) {
            files.add((String) objs[i]);
        }

        return files;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke listLogFiles on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to invoke listLogFiles on the SOAP service : " + e.getMessage(),
                e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call listLogFiles : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to create the SOAP call listLogFiles : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public LogFilePropertiesDTO[] listLogFileAttributes(String aJob) {
    try {//from   w  w w .j a  va 2  s  .  co  m
        WCTSoapCall call = new WCTSoapCall(host, port, service, "listLogFileAttributes");
        call.regTypes(LogFilePropertiesDTO.class);
        Object[] data = { aJob };

        LogFilePropertiesDTO[] fileProps = (LogFilePropertiesDTO[]) call.invoke(data);

        return fileProps;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke listLogFileAttributes on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to invoke listLogFileAttributes on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call listLogFileAttributes : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to create the SOAP call listLogFileAttributes : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public String[] tail(String aJob, String aFileName, int noOfLines) {
    try {/*w  ww .j a v  a  2  s .  c  o  m*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "tail");
        Object[] data = { aJob, aFileName, new Integer(noOfLines) };

        String[] logLines = (String[]) call.invoke(data);

        return logLines;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke tail on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to invoke tail on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call tail : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to create the SOAP call tail : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public Integer countLines(String aJob, String aFileName) {
    try {/*ww  w. j av  a2 s .c o m*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "countLines");
        Object[] data = { aJob, aFileName };

        Integer count = (Integer) call.invoke(data);

        return count;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke countLines on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to invoke countLines on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call countLines : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to create the SOAP call countLines : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public String[] get(String aJob, String aFileName, int startLine, int noOfLines) {
    try {/*  w w w. j av  a 2  s . c  om*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "get");
        Object[] data = { aJob, aFileName, new Integer(startLine), new Integer(noOfLines) };

        String[] logLines = (String[]) call.invoke(data);

        return logLines;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke get on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to invoke get on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call get : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to create the SOAP call get : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public String[] getHopPath(String aJob, String aResultOid, String aFileName, String aUrl) {
    try {/*from w w w  . ja  v  a2s  . com*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "getHopPath");
        Object[] data = { aJob, aResultOid, aFileName, aUrl };

        String[] logLines = (String[]) call.invoke(data);

        return logLines;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke getHopPath on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to invoke getHopPath on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call getHopPath : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException("Failed to create the SOAP call getHopPath : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public Integer findFirstLineBeginning(String aJob, String aFileName, String match) {
    try {/*from  w  w w. ja  va 2  s.  c o m*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "findFirstLineBeginning");
        Object[] data = { aJob, aFileName, match };

        Integer logLine = (Integer) call.invoke(data);

        return logLine;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke findFirstLineBeginning on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to invoke findFirstLineBeginning on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call findFirstLineBeginning : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to create the SOAP call findFirstLineBeginning : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public Integer findFirstLineContaining(String aJob, String aFileName, String match) {
    try {/*from  www .  j  a  v  a2 s  . c o  m*/
        WCTSoapCall call = new WCTSoapCall(host, port, service, "findFirstLineContaining");
        Object[] data = { aJob, aFileName, match };

        Integer logLine = (Integer) call.invoke(data);

        return logLine;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke findFirstLineContaining on the SOAP service : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to invoke findFirstLineContaining on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call findFirstLineContaining : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to create the SOAP call findFirstLineContaining : " + e.getMessage(), e);
    }
}

From source file:org.webcurator.core.reader.LogReaderSOAPClient.java

public Integer findFirstLineAfterTimeStamp(String aJob, String aFileName, Long timestamp) {
    try {// w ww  . j av a 2  s. co  m
        WCTSoapCall call = new WCTSoapCall(host, port, service, "findFirstLineAfterTimeStamp");
        Object[] data = { aJob, aFileName, timestamp };

        Integer logLine = (Integer) call.invoke(data);

        return logLine;
    } catch (RemoteException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to invoke findFirstLineAfterTimeStamp on the SOAP service : " + e.getMessage(),
                    e);
        }
        throw new WCTRuntimeException(
                "Failed to invoke findFirstLineAfterTimeStamp on the SOAP service : " + e.getMessage(), e);
    } catch (ServiceException e) {
        if (log.isErrorEnabled()) {
            log.error("Failed to create the SOAP call findFirstLineAfterTimeStamp : " + e.getMessage(), e);
        }
        throw new WCTRuntimeException(
                "Failed to create the SOAP call findFirstLineAfterTimeStamp : " + e.getMessage(), e);
    }
}