Examples of ArgumentSaverException


Examples of net.sf.sstk.retry.ArgumentSaverException

  }

  @Test(expected = ArgumentSaverException.class)
  public void testHandleWithRetryArgSaveFail() throws Throwable {
    expectSaveArgs();
    EasyMock.expectLastCall().andThrow(new ArgumentSaverException("test"));
    expectFinalOnSaver();
    EasyMockUnitils.replay();
    this.fixture.setPatient(false);
    this.fixture.handleWithRetry(this.invocation, this.definition);
  }
View Full Code Here

Examples of net.sf.sstk.retry.ArgumentSaverException

  }

  @Test
  public void testHandleWithRetryArgSaveFailPatient() throws Throwable {
    expectSaveArgs();
    EasyMock.expectLastCall().andThrow(new ArgumentSaverException("test"));
    EasyMock.expect(this.invocation.proceed()).andReturn(
        this.expectedResult);
    this.fixture.setPatient(true);
    expectResult();
  }
View Full Code Here

Examples of net.sf.sstk.retry.ArgumentSaverException

  @Override
  protected Object restorArg(final Object data) throws ArgumentSaverException {
    try {
      return this.serializer.deserialize((byte[]) data);
    } catch (IOException e) {
      throw new ArgumentSaverException(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of net.sf.sstk.retry.ArgumentSaverException

    if (origArg instanceof Serializable) {
      final Serializable seriArg = (Serializable) origArg;
      try {
        return this.serializer.serialize(seriArg);
      } catch (IOException e) {
        throw new ArgumentSaverException(e.getMessage(), e);
      }
    }
    throw new ArgumentSaverException(origArg + "not serilizable");
  }
View Full Code Here

Examples of net.sf.sstk.retry.ArgumentSaverException

   * @see net.sf.sstk.retry.ArgumentSaver#restoreArgs()
   */
  public Object[] restoreArgs() throws ArgumentSaverException {
    final Object[] loadData = (Object[]) this.data.get();
    if (loadData == null) {
      throw new ArgumentSaverException("no data saved in current thread");
    }
    final Object[] loadedArgs = new Object[loadData.length];
    for (int i = 0; i < loadData.length; i++) {
      if (loadData[i] != null) {
        loadedArgs[i] = restorArg(loadData[i]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.