public static ExchangeStatus valueOf(String status) { ExchangeStatus instance; // // Convert symbolic name to object reference. // if (status.equals(DONE.toString())) { instance = DONE; } else if (status.equals(ERROR.toString())) { instance = ERROR; } else if (status.equals(ACTIVE.toString())) { instance = ACTIVE; } else { // // Someone has a problem. // throw new java.lang.IllegalArgumentException(status); } return instance; }
/** * Returns instance of ExchangeStatus that corresponds to given string. * * @param status * String representation of status value * @return ExchangeStatus corresponding to the given string value; must be * non-null * @throws java.lang.IllegalArgumentException * if string can't be translated (null or non-status value) */ public static javax.jbi.messaging.ExchangeStatus valueOf(final java.lang.String status) { if (status.equals(ACTIVE.toString())) { return ACTIVE; } else if (status.equals(DONE.toString())) { return DONE; } else if (status.equals(ERROR.toString())) { return ERROR; } else { throw new IllegalArgumentException("Unknown status: " + status); } }
/** * Returns instance of ExchangeStatus that corresponds to given string. * * @param status string value of status * @return ExchangeStatus * @throws java.lang.IllegalArgumentException if string can't be translated */ public static ExchangeStatus valueOf(String status) { ExchangeStatus instance; // // Convert symbolic name to object reference. // if (status.equals(DONE.toString())) { instance = DONE; } else if (status.equals(ERROR.toString())) { instance = ERROR; } else if (status.equals(ACTIVE.toString())) { instance = ACTIVE; } else { // // Someone has a problem. // throw new java.lang.IllegalArgumentException(status); } return instance; }
/** * Write to a Stream * * @param output * @throws IOException */ public void writeExternal(ObjectOutput output) throws IOException { output.writeUTF(pattern.toString()); output.writeUTF(exchangeId != null ? exchangeId : ""); output.writeUTF(status.toString()); output.writeObject(destinationId); output.writeObject(sourceId); output.writeObject(serviceName); output.writeObject(interfaceName); output.writeObject(operationName); output.writeObject(error); output.writeObject(properties); output.writeObject(in); output.writeObject(out); output.writeObject(fault); output.writeObject(endpoint); output.writeByte((persistent == null) ? 0 : persistent.booleanValue() ? 1 : 2); }
fw.write(trackingInfo.getStatus().toString()); fw.write("\n");
this.getLogger() .fine(String.format("Received acknowledgment '%s' for transfered file '%s'. Delete it", asyncExchange.getStatus().toString(), transferedfile.getAbsolutePath())); if (!transferedfile.delete()) { this.getLogger().log(Level.WARNING,
SoapConstants.SOAP.ERROR_WRONG_MESSAGE_STATUS + " " + exchange.getStatus().toString(), FAULT_SERVER);