Codota Logo
AstrixRemoteResult.successful
Code IndexAdd Codota to your IDE (free)

How to use
successful
method
in
com.avanza.astrix.core.AstrixRemoteResult

Best Java code snippets using com.avanza.astrix.core.AstrixRemoteResult.successful (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: AvanzaBank/astrix

@Deprecated
public static <T> List<AstrixRemoteResult<T>> convertToAstrixRemoteResults(SpaceRemotingResult<T>[] results) {
  List<AstrixRemoteResult<T>> converted = new ArrayList<AstrixRemoteResult<T>>(results.length);
  for (SpaceRemotingResult<T> result : results) {
    if (result.getException() != null) {
      converted.add(AstrixRemoteResult.<T>failure(toRuntimeException(result.getException()), CorrelationId.undefined()));
    } else {
      converted.add(AstrixRemoteResult.successful(result.getResult()));
    }
  }
  return converted;
}

origin: AvanzaBank/astrix

@SuppressWarnings("unchecked")
protected final <T> AstrixRemoteResult<T> toRemoteResult(AstrixServiceInvocationResponse response, Type returnType) {
  if (response.isServiceUnavailable()) {
    return AstrixRemoteResult.unavailable(response.getExceptionMsg(), CorrelationId.valueOf(response.getCorrelationId()));
  }
  if (response.hasThrownException()) {
    CorrelationId correlationId = CorrelationId.valueOf(response.getCorrelationId());
    return AstrixRemoteResult.failure(createClientSideException(response, apiVersion), correlationId);
  }
  if (returnType.equals(Void.TYPE) || returnType.equals(Void.class)) {
    return AstrixRemoteResult.voidResult();
  }
  if (isOptionalType(returnType)) {
    return AstrixRemoteResult.successful(restoreOptional(response, returnType));
  }
  T result = unmarshall(response, returnType, apiVersion);
  return AstrixRemoteResult.successful(result);
}

com.avanza.astrix.coreAstrixRemoteResultsuccessful

Popular methods of AstrixRemoteResult

  • getResult
    Returns the result from the underlying service invocation.
  • failure
  • unavailable
  • voidResult

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • orElseThrow (Optional)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now