Examples of BamError


Examples of com.caucho.bam.BamError

   
    if (log.isLoggable(Level.FINER)) {
      log.finer(msg);
    }

    BamError error = new BamError(BamError.TYPE_CANCEL,
                                      BamError.ITEM_NOT_FOUND,
                                      msg);

    MessageStream fromStream = getMailbox(from);
View Full Code Here

Examples of com.caucho.bam.BamError

   
    if (log.isLoggable(Level.FINER)) {
      log.finer(msg);
    }

    BamError error = new BamError(BamError.TYPE_CANCEL,
                                      BamError.ITEM_NOT_FOUND,
                                      msg);

    MessageStream fromStream = getMailbox(from);
View Full Code Here

Examples of com.caucho.bam.BamError

      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) in.readObject();
        BamError error = (BamError) in.readObject(BamError.class);
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " messageError " + error + " " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.messageError(to, from, value, error);

        break;
      }

    case QUERY:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " query " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.query(id, to, from, value);

        break;
      }

    case QUERY_RESULT:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " queryResult " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.queryResult(id, to, from, value);

        break;
      }

    case QUERY_ERROR:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        BamError error = (BamError) in.readObject(BamError.class);
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " queryError " + error + " " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
View Full Code Here

Examples of com.caucho.bam.BamError

    String msg;
    msg = (this + ": message is not implemented for this payload"
           + "\n  " + payload + "\n  {from:" + from + ", to:" + to + "}");

    BamError error = new BamError(BamError.TYPE_CANCEL,
                                      BamError.FEATURE_NOT_IMPLEMENTED,
                                      msg);

    MessageStream linkStream = getBroker();
View Full Code Here

Examples of com.caucho.bam.BamError

    String msg;
    msg = (this + ": query is not implemented for this payload"
           + "\n  " + payload + "\n  {id:" + id + ", from:" + from + ", to:" + to + "}");

    BamError error = new BamError(BamError.TYPE_CANCEL,
                                      BamError.FEATURE_NOT_IMPLEMENTED,
                                      msg);

    MessageStream broker = getBroker();
View Full Code Here

Examples of com.caucho.bam.BamError

    Throwable cause = getCause();

    if (cause instanceof BamException)
      return ((BamException) cause).createActorError();
    else if (cause != null) {
      return new BamError(BamError.TYPE_CANCEL,
                            BamError.INTERNAL_SERVER_ERROR,
                            cause.toString());
    }
    else {
      return new BamError(BamError.TYPE_CANCEL,
                            BamError.INTERNAL_SERVER_ERROR,
                            toString());
    }
  }
View Full Code Here

Examples of com.caucho.bam.BamError

      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " messageError " + error + " " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.messageError(to, from, value, error);

        break;
      }

    case QUERY:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " query " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.query(id, to, from, value);

        break;
      }

    case QUERY_RESULT:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryResult " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.queryResult(id, to, from, value);

        break;
      }

    case QUERY_ERROR:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryError " + error + " " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }
View Full Code Here

Examples of com.caucho.bam.BamError

      return;
    } catch (Exception e) {
      log.log(Level.FINE, e.toString(), e);
   
      getBroker().queryError(id, from, to, query,
                                 new BamError(BamError.TYPE_AUTH,
                                                BamError.NOT_AUTHORIZED,
                                                e.getMessage()));
      return;
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
View Full Code Here

Examples of com.caucho.bam.BamError

           
            if (item != null) {
              QueryCallback cb = item._callback;
             
              Exception exn = new TimeoutException();
              BamError error = BamError.create(exn);
             
              cb.onQueryError(null, null, null, error);
            }
          }
         
View Full Code Here

Examples of com.caucho.bam.BamError

    if (entry == null) {
      log.fine(this + " copyError dst='" + query.getTag() + "' src='" + query.getSourceTag() + "'");

      getBroker().queryError(id, from, to, query,
                                   new BamError(BamError.TYPE_CANCEL,
                                                  BamError.ITEM_NOT_FOUND,
                                                  "unknown tag"));
      return;
    }
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.