Codota Logo
com.avanza.astrix.core
Code IndexAdd Codota to your IDE (free)

How to use com.avanza.astrix.core

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: AvanzaBank/astrix

/**
 * Invoked on the client-side to create a new instance of this exception with a proper
 * stack-trace containing the actual point of the service call.
 * 
 * This method should be overridden by all subclasses. It will become abstract in a future release.
 * 
 * @return
 */
protected ServiceInvocationException recreateOnClientSide() {
  // TODO: make this method abstract and remove malformed property
  return reCreateOnClientSide(null);
}
origin: AvanzaBank/astrix

/**
 * Sets whether service provided by the target application
 * should publish its versioned services. When services are
 * published they can be consumed from other subsystems. 
 * 
 * @param serviceState
 */
@AstrixBroadcast
void setPublishServices(boolean published);

origin: AvanzaBank/astrix

  @Override
  public ServiceUnavailableException getThrownException() {
    return new ServiceUnavailableException(msg + " correlationId=" + correlationId);
  }
}
origin: AvanzaBank/astrix

@Override
protected ServiceInvocationException recreateOnClientSide() {
  return new RemoteServiceInvocationException(getServiceExceptionMessage(), getExceptionType());
}

origin: AvanzaBank/astrix

@AstrixRouting
public String getServiceBeanType() {
  return serviceBeanType;
}

origin: AvanzaBank/astrix

@Override
public LunchRestaurant reduce(List<AstrixRemoteResult<LunchRestaurant>> result) {
  for (AstrixRemoteResult<LunchRestaurant> l : result) {
    if (l.getResult() != null) {
      return l.getResult();
    }
  }
  return null;
}
origin: AvanzaBank/astrix

private RoutingStrategy createRoutingStrategy(Method proxiedMethod) {
  AstrixRoutingStrategy router = proxiedMethod.getAnnotation(AstrixRoutingStrategy.class);
  Class<? extends RoutingStrategy> routingStrategyClass = router.value();
  try {
    return ReflectionUtil.newInstance(routingStrategyClass);
  } catch (Exception e) {
    throw new IllegalServiceMetadataException("Failed to create RoutingStrategy", e);
  }
}

origin: AvanzaBank/astrix

void reThrow(CorrelationId correlationId) {
   ServiceInvocationException serviceInvocationException = recreateOnClientSide();
   if (serviceInvocationException == null) {
     serviceInvocationException = this; 
     serviceInvocationException.malformed = true;
   }
   serviceInvocationException.setCorrelationId(correlationId);
   throw serviceInvocationException;
}
origin: AvanzaBank/astrix

public static <T> AstrixRemoteResult<T> voidResult() {
  return new SuccessfulResult<>(null);
}

origin: AvanzaBank/astrix

public static CorrelationId valueOf(String id) {
  return new CorrelationId(id);
}

origin: AvanzaBank/astrix

public T getResult() {
  throw getThrownException();
}

origin: AvanzaBank/astrix

public T getResult() {
  exception.reThrow(correlationId);
  return null;
}

origin: AvanzaBank/astrix

public static <T> AstrixRemoteResult<T> unavailable(String msg, CorrelationId correlationId) {
  return new ServiceUnavailableResult<T>(msg, correlationId);
}

origin: AvanzaBank/astrix

public static <T> AstrixRemoteResult<T> failure(ServiceInvocationException exception, CorrelationId correlationId) {
  return new ServiceInvocationExceptionResult<>(exception, correlationId);
}

origin: AvanzaBank/astrix

  @AstrixBroadcast(reducer = LunchRestaurantGradeReducer.class)
  LunchRestaurantGrade getHighestGrade();
}
origin: AvanzaBank/astrix

private UnaryOperator<Exception> serviceUnavailable() {
  return e -> new ServiceUnavailableException("Failed to submit remote invocation task", e);
}
origin: AvanzaBank/astrix

  List<AstrixServiceRegistryEntry> listServices(@AstrixRouting String type, String qualifier);	
}
origin: AvanzaBank/astrix

public static <T> AstrixRemoteResult<T> successful(T result) {
  return new SuccessfulResult<>(result);
}

origin: AvanzaBank/astrix

public static CorrelationId undefined() {
  return new CorrelationId("-");
}
origin: AvanzaBank/astrix

@AstrixBroadcast
List<AstrixServiceRegistryEntry> listServices();

com.avanza.astrix.core

Most used classes

  • AstrixBroadcast
  • ServiceUnavailableException
    Exception thrown when a service is unavailable, i.e we failed to invoke the target service. For exam
  • AstrixRemoteResult
  • AstrixRouting
  • ReflectionUtil
  • RemoteServiceInvocationException,
  • CheckedCommand,
  • RoutingKey,
  • AstrixCallStackTrace,
  • AstrixPartitionedRouting,
  • NamedThreadFactory,
  • AstrixRemoteResult$ServiceInvocationExceptionResult,
  • AstrixRemoteResult$ServiceUnavailableResult,
  • AstrixRemoteResult$SuccessfulResult,
  • AstrixRoutingStrategy,
  • IllegalServiceMetadataException,
  • RemoteResultReducer,
  • ServiceInvocationException,
  • Command
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