Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.ClientProperty


   }

   public void setShortProperty(String key, short value) throws JMSException {
      key = addToKeyAndCheck(key);
      checkPropertiesReadOnly("setShortProperty", key);
      this.props.put(key, new ClientProperty(key, Constants.TYPE_SHORT, null, "" + value));  
   }
View Full Code Here


   }

   public void setStringProperty(String key, String value) throws JMSException {
      key = addToKeyAndCheck(key);
      checkPropertiesReadOnly("setStringProperty", key);
      this.props.put(key, new ClientProperty(key, null, null, value));  
   }
View Full Code Here

         FileWriterCallback callback = new FileWriterCallback(importLocation, tmpImportLocation, lockExtention, overwriteDumpFiles, keepDumpFiles);
         String filename = "second.dat";
         File checkFile = new File("/tmp/" + filename);
         checkFile.delete();
         HashMap map = new HashMap();
         map.put("_filename", new ClientProperty("_filename", null, null, filename));
         String key = XBMessage.addToKeyAndCheck(XBConnectionMetaData.JMSX_GROUP_SEQ);
         map.put(key, new ClientProperty(key, null, null, "" + 0L));
         callback.update("dummy", new ByteArrayInputStream("first".getBytes()), map);

         map.clear();
         map.put("_filename", new ClientProperty("_filename", null, null, filename));
         key = XBMessage.addToKeyAndCheck(XBConnectionMetaData.JMSX_GROUP_SEQ);
         map.put(key, new ClientProperty(key, null, null, "" + 1L));
         callback.update("dummy", new ByteArrayInputStream("second".getBytes()), map);
        
         map.clear();
         map.put("_filename", new ClientProperty("_filename", null, null, filename));
         key = XBMessage.addToKeyAndCheck(XBConnectionMetaData.JMSX_GROUP_SEQ);
         map.put(key, new ClientProperty(key, null, null, "" + 2L));
         key = XBMessage.addToKeyAndCheck(XBConnectionMetaData.JMSX_GROUP_EOF);
         map.put(key, new ClientProperty(key, null, null, "true"));
         callback.update("dummy", new ByteArrayInputStream("third".getBytes()), map);
        
         assertTrue("The file 'dummy' must exist", checkFile.exists());
         FileInputStream fis = new FileInputStream(checkFile);
         byte[] buf = new byte[100];
View Full Code Here

      // description.setCommand("UPDATE");
      description.setCommand(ReplicationConstants.REPLICATION_CMD);
      description.setIdentity("TABLE1");
      ret.setDescription(description);
      SqlRow row = new SqlRow(info, 0);
      row.setColumn(new ClientProperty("FIRST", null, null, first));
      row.setColumn(new ClientProperty("SECOND", null, null, second));
      row.setColumn(new ClientProperty("FIFTH", null, null, fifth));

      row.setAttribute(new ClientProperty("transaction", null, null, "" + replKey));
      row.setAttribute(new ClientProperty("guid", null, null, "" + replKey));
      row.setAttribute(new ClientProperty("dbId", null, null, "NULL"));
      row.setAttribute(new ClientProperty("tableName", null, null, "TABLE1"));
      row.setAttribute(new ClientProperty("version", null, null, "0.5"));
      row.setAttribute(new ClientProperty("action", null, null, "UPDATE"));
      StringBuffer buf = new StringBuffer(1024);
      buf.append("<col name='FIRST'>").append(oldFirst).append("</col>\n");
      buf.append("<col name='SECOND'>").append(oldSecond).append("</col>\n");

      row.setAttribute(new ClientProperty("oldContent", null, "forcePlain", buf.toString()));
      row.setAttribute(new ClientProperty("schema", null, null, "XMLBLASTER"));
      row.setAttribute(new ClientProperty("replKey", null, null, "" + replKey));
      ret.getRows().add(row);
      return ret;
     
   }
View Full Code Here

         this.connectInProgress = true;

         try {
            this.connectQos = (qos==null) ? new ConnectQos(glob) : qos;

            ClientProperty tmp = this.connectQos.getClientProperty(Constants.UPDATE_BULK_ACK);
            if (tmp != null) {
               if (tmp.getBooleanValue()) {
                  log.info("Setting the flag '" + Constants.UPDATE_BULK_ACK + "' to 'true' since specified in ConnectQos");
                  this.updateBulkAck = true;
               }
            }
View Full Code Here

         else {
            String key = tok.substring(0,pos).trim();
            String value = tok.substring(pos+1);
            if (trimValue) value = value.trim();
            if (wantClientProperties)
               ret.put(key, new ClientProperty(key, null, null, value));
            else
               ret.put(key, value);
         }
      }
      return ret;
View Full Code Here

         }
         else {
            String key = tok.substring(0,pos).trim();
            String value = tok.substring(pos+1).trim();
            if (wantClientProperties)
               ret.put(key, new ClientProperty(key, null, null, value));
            else
               ret.put(key, value);
         }
      }
      return ret;
View Full Code Here

      final boolean ignorePutInterceptor = false;
      if (cbSessId != null) {
         String oldCbSessionId = qos.getClientProperty(ENTRY_CB_SESSION_ID, (String)null);
         if (oldCbSessionId != null && !oldCbSessionId.equals(cbSessId)) {
            log.warning("the client property '" + ENTRY_CB_SESSION_ID + "' is a reserved word, we will overwrite its value='" + oldCbSessionId + "' to be '" + cbSessionId + "'");
            ClientProperty prop = new ClientProperty(ENTRY_CB_SESSION_ID, null, null, cbSessId);
            qos.getClientProperties().put(prop.getName(), prop);
         }
      }
      MsgUnit msgUnit = new MsgUnit(key.getData(), cont, qos.getData());
      MsgQueuePublishEntry entry = new MsgQueuePublishEntry(this.global, msgUnit, this.queue.getStorageId());
      this.queue.put(entry, ignorePutInterceptor);
View Full Code Here

         log.fine("entering with cbSessionId='" + cbSessId + "'");
         if (this.timer != null && this.timestamp != null) { // no need to be threadsafe since update is single thread
            this.timer.removeTimeoutListener(this.timestamp);
            this.timestamp = null;
         }
         ClientProperty exProp = getProp(XBConnectionMetaData.JMSX_GROUP_EX, updQos);
         // TODO Check if this exception really should be thrown: I think it shall not be thrown since it is an exception
         // which occured when publishing and this is the information that the update should return
         if (exProp != null)
            throw new XmlBlasterException(this.global, ErrorCode.USER_UPDATE_INTERNALERROR, "update", "An exception occured on a chunk when updating. " + updQos.toXml());
         isLastChunk = isLastChunk(updQos);
View Full Code Here

      CallbackAddress[] cba = this.connectQos.getSessionCbQueueProperty().getCallbackAddresses();
      if (cba.length > 0) {
         if (log.isLoggable(Level.FINE)) log.fine(ME+": Creating dispatch manager as ConnectQos contains callback addresses");
         for (int i=0; i<cba.length; i++) {
            cba[i].setSessionName(this.sessionName);
            cba[i].addClientProperty(new ClientProperty("__ContextNode", "String", null, this.contextNode.getAbsoluteName()));
            cba[i].setFromPersistenceRecovery(connectQos.isFromPersistenceRecovery());
         }
         this.dispatchManager = new DispatchManager(glob, this.msgErrorHandler,
                                this.securityCtx, this.sessionQueue, (I_ConnectionStatusListener)null,
                                cba, this.sessionName);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.qos.ClientProperty

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.