@Override public void setInboundPayload(Inbound newInboundPayload) { wrapped.setInboundPayload(newInboundPayload); }
@Override public void setInboundPayload(Inbound newInboundPayload) { wrapped.setInboundPayload(newInboundPayload); }
public JobManager.Checkpoint load(CheckpointFilename cf, Outbound outbound) throws IOException, ClassNotFoundException { FileInputStream fis = null; ObjectInputStream ois = null; JobManager.Checkpoint checkpoint; try { fis = new FileInputStream(cf.getFile()); ois = factory.createObjectInputStream(fis); checkpoint = (JobManager.Checkpoint) ois.readObject(); } finally { try {ois.close();} catch (Exception ex) { } try {fis.close();} catch (Exception ex) { } } if (outbound != null) { loadOutbound(outbound, cf.getForPayload(false).getFile()); checkpoint.getContext().setOutboundPayload(outbound); } Inbound inbound = loadInbound(cf.getForPayload(true).getFile()); checkpoint.getContext().setInboundPayload(inbound); try { String username = checkpoint.getJob().getSubjectUsernames().get(0); Subject subject = authenticationService.impersonate(username, /* groups */ null, /* subject */ null, /* virtual */ false); checkpoint.getContext().setSubject(subject); } catch (LoginException e) { throw new RuntimeException(e); } return checkpoint; }