Examples of readObject()


Examples of org.teiid.netty.handler.codec.serialization.CompactObjectInputStream.readObject()

          }
 
          buffer.skipBytes(4);
          CompactObjectInputStream cois = new CompactObjectInputStream(
                  new ChannelBufferInputStream(buffer, dataLen), classLoader);
          result = cois.readObject();
          streams = ExternalizeUtil.readList(cois, StreamFactoryReference.class);
          streamIndex = 0;
      }
      while (streamIndex < streams.size()) {
        if (buffer.readableBytes() < 2) {
View Full Code Here

Examples of org.voltdb.messaging.FastDeserializer.readObject()

        assertNotNull(invocation_bytes);
       
        for (int partition = 0; partition < 100; partition+=3) {
            StoredProcedureInvocation.setBasePartition(partition, ByteBuffer.wrap(invocation_bytes));
            FastDeserializer fds = new FastDeserializer(invocation_bytes);
            StoredProcedureInvocation clone = fds.readObject(StoredProcedureInvocation.class);
            assertNotNull(clone);
            assert(clone.hasBasePartition());
            assertEquals(partition, clone.getBasePartition());
        } // FOR
    }
View Full Code Here

Examples of org.xmlBlaster.client.protocol.http.common.ObjectInputStreamMicro.readObject()

         inVec.add(content);
         oosm.writeObject(inVec);
        
         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStreamMicro oism = new ObjectInputStreamMicro(bais);
         Object obj = oism.readObject();
         assertTrue("hashtable is not of type 'Vector', it is " + obj.getClass().getName(), obj instanceof Vector);
         Vector vec = (Vector)obj;
         assertEquals("wrong number of entries in vector", 6, vec.size());
         Hashtable keyOut = (Hashtable)vec.get(0);
         Hashtable qosOut = (Hashtable)vec.get(1);
View Full Code Here

Examples of org.xmlBlaster.engine.runlevel.PluginConfigSaxFactory.readObject()

    
         String xml = config.toXml();
         log.info(xml);
    
         PluginConfigSaxFactory factory = new PluginConfigSaxFactory(this.glob);
         config = factory.readObject(xml);
         RunLevelAction[] actions = config.getActions();
         assertEquals(me + " number of actions", 2, actions.length);
      }
      catch (XmlBlasterException e) {
         fail(ME + " failed: " + e.toString());
View Full Code Here

Examples of org.xmlBlaster.engine.runlevel.PluginHolderSaxFactory.readObject()

         PluginHolderSaxFactory factory = new PluginHolderSaxFactory(this.glob);
         PluginHolder pluginHolder = null;
         for (int i=0; i < 2; i++) {
            log.info("looping through the loop. sweep '" + i + "'");
            pluginHolder = factory.readObject(xml);
            PluginConfig[] plugins = pluginHolder.getAllPluginConfig("avalon");
            assertEquals(me + " number of plugins for 'avalon' in plugin holder", 6, plugins.length);

            PluginConfig pluginConfig = null;
            pluginConfig = pluginHolder.getPluginConfig("avalon","dispatchPriority");
View Full Code Here

Examples of org.xmlBlaster.engine.runlevel.RunLevelActionSaxFactory.readObject()

                      "        onStartupRunlevel='3'\n" +
                      "        sequence='5'\n" +
                      "        onFail='resource.configuration.pluginFailed'/>";
  
         RunLevelActionSaxFactory factory = new RunLevelActionSaxFactory(this.glob);
         RunLevelAction action = factory.readObject(xml);

         for (int i=0; i < 2; i++) {
            assertEquals(me + " checking do attribute", "LOAD", action.getDo());
            assertEquals(me + " checking onFail attribute", "resource.configuration.pluginFailed", action.getOnFail().getErrorCode());
            assertEquals(me + " checking onShutdownLevel attribute", -1, action.getOnShutdownRunlevel());
View Full Code Here

Examples of org.xmlBlaster.util.key.MsgKeySaxFactory.readObject()

            throw new XBException("client.configuration", "A Topic must be specified in the message to be sent");

         // determine if it is a complete key
         if (tmp != null && tmp.indexOf('<') > -1) { // complete key
            MsgKeySaxFactory keyFactory = new MsgKeySaxFactory(global);
            key = new PublishKey(global, keyFactory.readObject(tmp));
         }
         else { // then it is a simple oid
            if (tmp != null)
               key = new PublishKey(global, tmp);
            else
View Full Code Here

Examples of org.xmlBlaster.util.qos.ConnectQosSaxFactory.readObject()

         qos.addClientProperty("twoKey", "twoValue");
         qos.addClientProperty("threeKey", new Integer(55));
         String literal = qos.toXml();
        
         ConnectQosSaxFactory factory = new ConnectQosSaxFactory(this.glob);
         ConnectQosData data = factory.readObject(literal);
         checkValues(data.getClientProperties());
      }
      catch (XmlBlasterException ex) {
         assertTrue("Exeption occured : " + ex.getMessage(), false);
      }
View Full Code Here

Examples of org.xmlBlaster.util.qos.DisconnectQosSaxFactory.readObject()

      qos.addClientProperty("threeKey", new Integer(55));
      String literal = qos.toXml();
     
      DisconnectQosSaxFactory factory = new DisconnectQosSaxFactory(this.glob);
      try {
         DisconnectQosData data = factory.readObject(literal);
         checkValues(data.getClientProperties());
      }
      catch (XmlBlasterException ex) {
         assertTrue("Exeption occured : " + ex.getMessage(), false);
      }
View Full Code Here

Examples of org.xmlBlaster.util.qos.I_ConnectQosFactory.readObject()

         "   <clientProperty name='StringKey' type='String' encoding='" + Constants.ENCODING_BASE64 + "'>QmxhQmxhQmxh</clientProperty>\n" +
         "   <persistent>true</persistent>\n" +
         "</qos>\n";

         I_ConnectQosFactory factory = this.glob.getConnectQosFactory();
         ConnectQosData qos = factory.readObject(xml); // parse
         assertEquals("", true, qos.getPersistentProp().getValue());
         String newXml = qos.toXml();                  // dump
         qos = factory.readObject(newXml);             // parse again

         if (log.isLoggable(Level.FINE)) log.fine("ORIG=\n" + xml + "\n NEW=\n" + newXml);
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.