Codota Logo
ResultStream.fail
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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