Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Timestamp


      key.setClientTags("<location dest='agent-192.168.10.218' driver='PSD1'></location>");
      PublishQos qos = new PublishQos(glob);
      senderContent = "some content";
      try {
         MsgUnit msgUnit = new MsgUnit(key.toXml(), senderContent.getBytes(), qos.toXml());
         sentTimestamp = new Timestamp();
         publishOid = con.publish(msgUnit).getKeyOid();
         log.info("Success: Publishing done, returned oid=" + publishOid);
      } catch(XmlBlasterException e) {
         log.warning("XmlBlasterException: " + e.getMessage());
         assertTrue("publish - XmlBlasterException: " + e.getMessage(), false);
View Full Code Here


   private StorableFigureHolder getFigureHolder(Figure figure) {
      // MEMO: getAttribute does not work when using 'group or lines'
      StorableFigureHolder figureHolder = (StorableFigureHolder)this.figureTimestampTable.get(figure);
      if (figureHolder == null) {
         String timestamp = "" + (new Timestamp()).getTimestampLong();
         String figureId = this.drawingName + "-" + timestamp;
         figureHolder = new StorableFigureHolder(figure, figureId, null);
         addToTable(figureHolder);
      }
      return figureHolder;
View Full Code Here

      this.in = in;
   }
  
  
   void send(Session session, MessageProducer producer, Destination dest) throws JMSException {
      String streamId = (new org.xmlBlaster.util.Global()).getId() + "-" + (new Timestamp()).getTimestamp();
      setStringProperty(XBConnectionMetaData.JMSX_GROUP_ID, streamId);
      int bufSize = 0;
      if (propertyExists(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE))
         bufSize = getIntProperty(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE);
      if (bufSize > this.maxBufSize || bufSize == 0)
View Full Code Here

      this.errorCodeStr = this.errorCodeEnum.getErrorCode();
      this.node = (node == null) ? this.glob.getId() : node;
      this.location = location;
      this.lang = (lang == null) ? "en" : lang; // System.getProperty("user.language");
      this.versionInfo = (versionInfo == null) ? createVersionInfo() : versionInfo;
      this.timestamp = (timestamp == null) ? new Timestamp() : timestamp;
      this.timestampNanos = this.timestamp.getTimestamp();

      this.cause = cause;
      this.stackTrace = (stackTrace == null) ? createStackTrace() : stackTrace;
      String causeStr = "";
View Full Code Here

    * Timestamp when exception was thrown
    * @return Never null
    */
   public final Timestamp getTimestamp() {
      if (this.timestamp == null) {
         this.timestamp = new Timestamp(this.timestampNanos);
      }
      return this.timestamp;
   }
View Full Code Here

      }
      catch (Throwable e) {
         log.severe("Receiving invalid errorCode in XmlBlasterException in '" + new String(data) + "', handling it as " + errorCode.toString());
         message = "Receiving invalid errorCode in XmlBlasterException: Can't parse XmlBlasterException in method parseByteArr(). original message is '" + new String(data) + "'";
      }
      Timestamp ti = new Timestamp();
      try {
         ti = Timestamp.valueOf(timestampStr);
      }
      catch (Throwable e) {
         log.fine("Receiving invalid timestamp in XmlBlasterException in '" + new String(data) + "'");
View Full Code Here

                               url;
      }
      else {
         this.subscriptionId = Constants.SUBSCRIPTIONID_PREFIX +
                               sessionName.getRelativeName(true) + "-" +
                               new Timestamp().getTimestamp();
      }
     return this.subscriptionId;

   }
View Full Code Here

    * This constructor is for internal creation from persistence only.
    *
    * @param timestamp The unique nano timestamp as from org.xmlBlaster.util.Timestamp or null to create one now
    */
   public MsgQueueEntry(Global glob, String entryType, PriorityEnum priority, Timestamp timestamp, StorageId storageId, boolean persistent) {
      this.uniqueIdTimestamp = (timestamp == null) ? new Timestamp() : timestamp;
      this.uniqueIdString = "" + this.uniqueIdTimestamp.getTimestamp();

      if (entryType == null || priority == null || glob == null || storageId ==null) {
         log.severe("Invalid constructor parameter");
         Thread.dumpStack();
View Full Code Here

    * @see I_XmlBlasterConnection#connectLowlevel(Address)
    */
   public void connectLowlevel(Address address) throws XmlBlasterException {
      if (!this.isInitialized) {
         super.init(glob, address, this.pluginInfo);
         super.setEmailSessionId(""+new Timestamp().getTimestamp()); // Initially until the secret session id is known
        
         // Who are we?
         // We need to correct the mail addresses from EmailExecutor
         // as it assumes server side operation
         if (super.fromAddress == null) {
View Full Code Here

    * Cleanup timer, it is a weak reference on us therefor it is a 'nice to have'.
    */
   public void finalize() {
      try {
         Timeout dt = this.destroyTimer;
         Timestamp tk = this.timerKey;
         this.destroyTimer = null;
         this.timerKey = null;
         if (dt != null && tk != null) {
            if (log.isLoggable(Level.FINE)) log.fine("finalize timerKey=" + tk);
            dt.removeTimeoutListener(tk);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.Timestamp

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.