Package com.peterhi.property

Examples of com.peterhi.property.PropModel


      new RemoteSubscriptionResponse[1];
   
    RudpListener listener = new RudpListener() {
      @Override
      public void received(RudpEvent event) {
        PropModel sink;
       
        try {
          sink = read(event);
        } catch (Exception ex) {
          ex.printStackTrace();
View Full Code Here


    }
  }
 
  @Override
  public void received(final RudpEvent event) {
    PropModel sink;
   
    try {
      sink = read(event);
    } catch (Exception ex) {
      ex.printStackTrace();
View Full Code Here

    InstantiationException {
    InputStream stream = event.getInputStream();
   
    PmInputStream pis = new PmInputStream(stream);
    stream.mark(0);
    PropModel sink = pis.readModel();
    stream.reset();
    pis.close();
    return sink;
  }
View Full Code Here

      final RemoteMethodReturn[] reference =
        new RemoteMethodReturn[1];
      RudpListener listener = new RudpListener() {
        @Override
        public void received(RudpEvent event) {
          PropModel sink;
         
          try {
            sink = read(event);
          } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

    for (List<PropModel> list : lookup.values()) {
      writeSize(list.size(), false);
    }

    for (int i = 0; i < lookup.count(); i++) {
      PropModel m = lookup.get(i);
      Class<?> t = m.getClass();
      Set<PropDescriptor> ps = PropUtil.getDescriptors(t);
     
      for (PropDescriptor p : ps) {
        Class<?> pt = p.getType();
        Object pv = p.get(m);
View Full Code Here

          write(0xc0 | ((ch >>  6) & 0x1f));
          write(0x80 | ((ch >>  0) & 0x3f));
        }
      }
    } else if (PropModel.class.isAssignableFrom(type)) {
      PropModel model = (PropModel )value;
      writeIndex(model, lookup);
    } else if (type.isArray()) {
      int size = sizeof(value);
     
      if (!writeSize(size, true)) {
View Full Code Here

       
        if (!a.equals(address)) {
          return;
        }
       
        PropModel model = readModel(event);
       
        if (!(model instanceof RmSubscribeResponse)) {
          return;
        }
       
View Full Code Here

    return context.get();
  }
 
  private void doReceive(RudpEvent event) throws Exception {
    SocketAddress address = event.getSocketAddress();
    PropModel model = readModel(event);
    processModel(address, model);
  }
View Full Code Here

 
  private PropModel readModel(RudpEvent event) throws Exception {
    InputStream stream = event.getInputStream();
    stream.mark(0);
    PmInputStream pis = new PmInputStream(stream);
    PropModel model = pis.readModel();
    stream.reset();
    pis.close();
    return model;
  }
View Full Code Here

        Object v = e.getValue();
        build(k, map);
        build(v, map);
      }
    } else if (current instanceof PropModel) {
      PropModel model = (PropModel )current;
      Class<?> type = model.getClass();
      List<PropModel> list = map.get(type);
     
      if (list == null) {
        list = new ArrayList<PropModel>();
        map.put(type, list);
View Full Code Here

TOP

Related Classes of com.peterhi.property.PropModel

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.