⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectqos.java

📁 java开源的企业总线.xmlBlaster
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    * @return The version or null if not known    */   //public String getSecurityPluginVersion() {   //   return this.connectQosData.getSecurityPluginVersion();   //}   /**    * @param Set if we accept point to point messages    */   public void setPtpAllowed(boolean ptpAllowed) {      this.connectQosData.setPtpAllowed(ptpAllowed);   }   /**    * @return true if we are accepting PtP messages    */   public boolean isPtpAllowed() {      return this.connectQosData.isPtpAllowed();   }   /**    * @param Set if we allow multiple updates for the same message if we have subscribed multiple times to it.    * @deprecated Please use multiSubscribe=false from SubscribeQos    */   public void setDuplicateUpdates(boolean duplicateUpdates) {      this.connectQosData.setDuplicateUpdates(duplicateUpdates);   }   /**    * @return true if we allow multiple updates for the same message if we have subscribed multiple times to it.    * @deprecated Please use multiSubscribe=false from SubscribeQos    */   public boolean duplicateUpdates() {      return this.connectQosData.duplicateUpdates();   }   /**    * The configuration of the local client side queue.    * @return never null    */   public ClientQueueProperty getClientQueueProperty() {      return this.connectQosData.getClientQueueProperty();   }   /**    * The configuration of the local client side queue.    * @param Your hardcoded configuration    */   public void addClientQueueProperty(ClientQueueProperty clientQueueProperty) {      this.connectQosData.addClientQueueProperty(clientQueueProperty);   }   /**    * Set the address to which we want to connect, with all the configured parameters.    * <p />    * @param address  An object containing the protocol (e.g. EMAIL) the address (e.g. hugo@welfare.org) and the connection properties    */   public void setAddress(Address address) {      this.connectQosData.setAddress(address);   }   /**    * The connection address and properties of the xmlBlaster server    * we want connect to.    * @return never null    */   public Address getAddress() {      return this.connectQosData.getAddress();   }   /**    * The connection address and properties of the xmlBlaster server    * we want connect to.    * @return never null    */   public AddressBase[] getAddresses() {      return this.connectQosData.getAddresses();   }   /**    * Add a callback address where to send the message (for PtP or subscribes).    * <p />    * Creates a default CbQueueProperty object to hold the callback address argument.<br />    * Note you can invoke this multiple times to allow multiple callbacks.    * @param callback  An object containing the protocol (e.g. EMAIL) and the address (e.g. hugo@welfare.org)    */   public void addCallbackAddress(CallbackAddress callback) {      this.connectQosData.addCallbackAddress(callback);   }   /**    * Adds a queue description.    * This allows to set all supported attributes of a callback queue and a callback address    * @param prop The property object of the callback queue which shall be established in the server for calling us back.    * @see org.xmlBlaster.util.qos.address.CallbackAddress    */   public void setSessionCbQueueProperty(CbQueueProperty prop) {      this.connectQosData.setSessionCbQueueProperty(prop);   }   /**    * Returns never null.    * <p />    * If no CbQueueProperty exists, a RELATING_CALLBACK queue property object is created    * on the fly.    */   public CbQueueProperty getSessionCbQueueProperty() {      return this.connectQosData.getSessionCbQueueProperty();   }   /**    * The number of bytes of stringified qos    */   public int size() {      return this.connectQosData.size();   }   /**    * Converts the data into a valid XML ASCII string.    * @return An XML ASCII string    */   public String toString() {      return toXml();   }   /**    * Converts the data into a valid XML ASCII string.    * @return An XML ASCII string    */   public String toXml() {      return this.connectQosData.toXml();   }   /**    * Access the security interceptor to encrypt/decrypt.    * @return I_MsgSecurityInterceptor plugin or null    * @deprecated No use for this    */   //public I_MsgSecurityInterceptor getSecurityInterceptor() {   //   return this.securityInterceptor;   //}   /**    * Access the security interceptor to encrypt/decrypt.    * @return I_MsgSecurityInterceptor    * @deprecated No use for this    */   //public void setSecurityInterceptor(I_MsgSecurityInterceptor securityInterceptor) {   //   this.securityInterceptor = securityInterceptor;   //}   /**    * Sets a client property (an application specific property) to the    * given value    * @param key    * @param value    */   public void addClientProperty(String key, Object value) {      this.connectQosData.addClientProperty(key, value);   }   /**    * Read back a property.    * @return The client property or null if not found    */   public ClientProperty getClientProperty(String key) {      return this.connectQosData.getClientProperty(key);   }   /**    * sets the persistent flag for this subscription. If this flag is    * set, the subscription will persit a server crash.    * @param persistent    */   public void setPersistent(boolean persistent) {      this.connectQosData.setPersistent(persistent);   }   /**    * Gets the persistent flag. If this flag is    * set, the session will persist a server crash.    * @return true if persistent false otherwise.    */   public boolean getPersistent() {      return this.connectQosData.getPersistentProp().getValue();   }   /**    * Get a usage string for the connection parameters    */   public String usage() {      String text = "\n";      text += getSessionQos().usage();      return text;   }   /**    * Sets the queue properties for the subject queue of this subject    * @param subjectQueueProperty    */   public void setSubjectQueueProperty(CbQueueProperty subjectQueueProperty) {      this.connectQosData.setSubjectQueueProperty(subjectQueueProperty);   }   /**    * Gets the subject queue properties as set on this connection.    * @return the properties    */   public CbQueueProperty getSubjectQueueProperty() {      return this.connectQosData.getSubjectQueueProperty();   }   /**    * @return Returns the doSendConnect.    */   public boolean doSendConnect() {      return this.doSendConnect;   }   /**    * If set to false the connect() is not send to the    * server. In this case the client library is completely    * initialized and you can receive for example callback    * messages over 'email' or 'XMLRPC' protocols.<br />    * This is useful for clients which can't connect    * themselves (for example because of a firewall) and    * have a delegate client which does the real connect    * and possible subscribes.    * <br />    * Can be changed on command line with '-dispatch/connection/doSendConnect false'    * or in a property file.    * @param doSendConnect Overwrites default or value from environment    */   public void doSendConnect(boolean doSendConnect) {      this.doSendConnect = doSendConnect;   }   /**    *  For testing invoke: java org.xmlBlaster.client.qos.ConnectQos    */   public static void main( String[] args ) throws XmlBlasterException {      {         ConnectQos qos =new ConnectQos(new Global(args), "joe/2", "secret");//new SessionName(glob, "joe"));         qos.addClientProperty(Constants.UPDATE_BULK_ACK, "true");         System.out.println(qos.toXml());      }      {         ConnectQos qos =new ConnectQos(null);         System.out.println("Minimal:" + qos.toXml());      }   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -