Tabnine Logo
ResultStream.fail
Code IndexAdd Tabnine to your IDE (free)

How to use
fail
method
in
io.baratine.stream.ResultStream

Best Java code snippets using io.baratine.stream.ResultStream.fail (Showing top 20 results out of 315)

origin: baratine/baratine

 @Override
 public void fail(Throwable exn)
 {
  _resultStream.fail(exn);
 }
}
origin: baratine/baratine

@Override
public void fail(Throwable exn)
{
 _result.fail(exn);
}

origin: baratine/baratine

@Override
public void fail(HeadersAmp headers, Throwable exn)
{
 synchronized (this) {
  _result.fail(exn);
 }
}

origin: baratine/baratine

@Override
public void fail(Throwable exn)
{
 _result.fail(exn);
}

origin: baratine/baratine

@Override
public void fail(Throwable e)
{
 _result.fail(e);
}

origin: baratine/baratine

@Override
public void fail(Throwable exn)
{
 _result.fail(exn);
}

origin: baratine/baratine

@Override
public void fail(Throwable exn)
{
 next().fail(exn);
}

origin: baratine/baratine

@Override
public void fail(Throwable exn)
{
 getNext().fail(exn);
}

origin: baratine/baratine

@Override
public void fail(Throwable e)
{
 next().fail(e);
}

origin: baratine/baratine

default <U> Result<U> of(BiConsumer<U,ResultStream<T>> consumer)
{
 return Result.of(x->consumer.accept(x,this), exn->fail(exn));
}
origin: baratine/baratine

 public void run()
 {
  try {
   _spliterator.forEachRemaining(_result);
  } catch (Throwable exn) {
   _result.fail(exn);;
  } finally {
   _result.ok();
  }
 }
}
origin: baratine/baratine

@Override
public <T> void stream(HeadersAmp headers,
            ResultStream<T> result,
            StubAmp actor,
            Object []args)
{
 result.fail(new ServiceExceptionMethodNotFound(
              L.l("'{0}' is an undefined method for {1}",
                this, actor)));
}
origin: baratine/baratine

@Override
public void accept(T value)
{
 _fun.apply(_value, value, (x,e)->{ 
  if (e != null) {
   next().fail(e);
  }
  else {
   _value = x;
  }
 });
}
origin: baratine/baratine

private void fillStream(ResultStream<Cursor> result,
            Iterable<Cursor> iter)
{
 try {
  for (Cursor cursor : iter) {
   result.accept(cursor);
  }
  
  result.ok();
 } catch (Throwable e) {
  result.fail(e);
 }
}
origin: baratine/baratine

public void findStream(ResultStream<Cursor> result, Object[] args)
{
 findAll(Result.of(iter->fillStream(result, iter), 
           e->result.fail(e)), 
     args);
}

origin: baratine/baratine

private void readObjects(Iterable<Cursor> it, ResultStream<T> r)
{
 try {
  for (Cursor cursor : it) {
   T bean = _entityInfo.readObject(cursor, true);
   r.accept(bean);
  }
  r.ok();
 } catch (ReflectiveOperationException e) {
  //TODO log
  r.fail(e);
 }
}
origin: baratine/baratine

private void readObjects(Iterable<Cursor> it, ResultStream<T> r)
{
 try {
  for (Cursor c : it) {
   T t = _entityDesc.readObject(c, true);
   r.accept(t);
  }
  r.ok();
 } catch (ReflectiveOperationException e) {
  //TODO log
  r.fail(e);
 }
}
origin: baratine/baratine

 @Override
 public void accept(V value)
 {
  addPending();
  
  _consumer.accept(value, Result.of(x->{ subPending(); },
                    e->{
                     next().fail(e); 
                     subPending(); 
                    }));
 }
}
origin: baratine/baratine

@Override
public void accept(T value)
{
 addPending();
 
 _fun.apply(_value, value, 
       Result.of(x->{ _value = x; subPending(); },
             e->{ next().fail(e); subPending(); }));
}
origin: baratine/baratine

@Override
public void accept(T value)
{
 addPending();
 
 _map.apply(value, Result.of(x->{ 
  next().accept(x);
  
  subPending();
 },
 e->{ 
  next().fail(e);
  subPending();
 }));
}

io.baratine.streamResultStreamfail

Javadoc

Signals a failure to the client passing exception.

Popular methods of ResultStream

  • accept
    Supplies next value into the client's ResultStreamBuilder
  • of
  • ok
    Completes sending the values to the client and signals to the client that no more values is expected
  • createFork
  • createJoin
  • isCancelled
    Tests if the instance of ResultStream was cancelled.
  • acceptFuture
  • flush
  • handle
  • isFuture
  • onCancel
    A callback method that is called when the ResultStream is cancelled.
  • start
    Method start() performs initial operations on preparing an instance of ResultStream to accepting val
  • onCancel,
  • start

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JFileChooser (javax.swing)
  • JFrame (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now