Package com.caucho.bam

Examples of com.caucho.bam.ActorError


    if (marshal != null)
      query = marshal.fromXml(_in);
    else
      query = readAsXmlString(_in);

    ActorError error = null;
     
    skipToEnd("iq");

    if (_jid != null)
      from = _jid;
View Full Code Here


    String show = null;
    Text status = null;
    int priority = 0;
    ArrayList<Serializable> extraList = new ArrayList<Serializable>();
    ActorError error = null;

    while ((tag = _in.nextTag()) > 0
     && ! ("presence".equals(_in.getLocalName())
     && tag == XMLStreamReader.END_ELEMENT)) {
      if (_isFinest)
View Full Code Here

      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) hIn.readObject();
        ActorError error = (ActorError) hIn.readObject();
        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_GET:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();
        in.endPacket();

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

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

        break;
      }

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

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

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

        break;
      }

    case QUERY_RESULT:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.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 = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();
        ActorError error = (ActorError) hIn.readObject();
        in.endPacket();

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

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

      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) in.readObject();
        ActorError error = (ActorError) in.readObject(ActorError.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_GET:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        in.endPacket();

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

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

        break;
      }

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

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

        actorStream.querySet(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();
        ActorError error = (ActorError) in.readObject(ActorError.class);
        in.endPacket();

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

     
      String runtimeName = (String) server.getAttribute(objName, "Name");
     
      if (runtimeName == null) {
        getLinkStream().queryError(id, from, to, query,
                                   new ActorError("null runtime name"));
        return;
      }
     
      int p = runtimeName.indexOf('@');
     
      if (p > 0) {
        int pid = Integer.parseInt(runtimeName.substring(0, p));
     
        getLinkStream().queryResult(id, from, to, new PidQuery(pid));
        return;
      }
     
      getLinkStream().queryError(id, from, to, query,
                                 new ActorError("malformed name=" + runtimeName));
  
    } catch (Exception e) {
      getLinkStream().queryError(id, from, to, query,
                                 ActorError.create(e));
    }
View Full Code Here

      try {
        stream.queryGet(id, to, from, payload);
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);

        ActorError error = ActorError.create(e);

        queryError(id, from, to, payload, error);
      }

      return;
    }

    if (log.isLoggable(Level.FINE)) {
      log.fine(this + " queryGet to unknown stream to='" + to
               + "' from=" + from);
    }

    String msg = L.l("'{0}' is an unknown actor for queryGet", to);

    ActorError error = new ActorError(ActorError.TYPE_CANCEL,
                                    ActorError.SERVICE_UNAVAILABLE,
                                    msg);

    queryError(id, from, to, payload, error);
  }
View Full Code Here

                 + "' from=" + from);
      }

      String msg = L.l("'{0}' is an unknown actor for querySet", to);

      ActorError error = new ActorError(ActorError.TYPE_CANCEL,
                                      ActorError.SERVICE_UNAVAILABLE,
                                      msg);

      queryError(id, from, to, payload, error);
View Full Code Here

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

      getLinkStream().queryError(id, from, to, query,
                                   new ActorError(ActorError.TYPE_CANCEL,
                                                  ActorError.ITEM_NOT_FOUND,
                                                  "unknown tag"));
      return;
    }
View Full Code Here

TOP

Related Classes of com.caucho.bam.ActorError

Copyright © 2018 www.massapicom. 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.