Package jade.core

Examples of jade.core.CaseInsensitiveString


   */
  public void registerLanguage(Codec c, String name) {
    if (c == null) {
      throw new IllegalArgumentException("Null codec registered");
    }
    languages.put(new CaseInsensitiveString(name), c);
  }
View Full Code Here


  /**
   Adds a new locally installed MTP for the URL named
   <code>url</code>.
   */
  public synchronized void addLocalMTP(String url, MTP proto, MTPDescriptor dsc) {
    CaseInsensitiveString urlTmp = new CaseInsensitiveString(url)
    // A local MTP can receive messages
    inPorts.put(urlTmp, new MTPInfo(proto, dsc));
   
    // A local MTP can also send messages, over all supported protocols
    OutPort out = new OutViaMTP(proto, platformInfo);
View Full Code Here

   Removes a locally installed MTP for the URL named
   <code>url</code>.
   */
  public synchronized MTPInfo removeLocalMTP(String url) {
    // url = url.toLowerCase();
    CaseInsensitiveString urlTmp = new CaseInsensitiveString(url);
    // A local MTP appears both in the input and output port tables
    MTPInfo info = (MTPInfo) inPorts.remove(urlTmp);
    if(info != null) {
      MTP proto = info.getMTP();
      // Remove all outgoing ports associated with this MTP
View Full Code Here

   reaching the address <code>url</code>.
   */
  public synchronized OutPort lookup(String url) {
    //url = url.toLowerCase();
    String proto = extractProto(url);
    CaseInsensitiveString protoTmp = new CaseInsensitiveString(proto);
    OutPortList l = (OutPortList)outPorts.get(protoTmp);
    if(l != null) {
      return l.get();
    }
    else {
View Full Code Here

    return inPorts.values().iterator();
  }
 
  private void addOutPort(String proto, OutPort port, boolean location) {
    //proto = proto.toLowerCase();
    CaseInsensitiveString protoTmp = new CaseInsensitiveString(proto);
    OutPortList l = (OutPortList)outPorts.get(protoTmp);
    if(l != null)
      l.add(port, location);
    else {
      l = new OutPortList();
View Full Code Here

    }
  }
 
  private void removeOutPort(String proto, OutPort port) {
    //proto = proto.toLowerCase();
    CaseInsensitiveString protoTmp = new CaseInsensitiveString(proto);
    OutPortList l = (OutPortList)outPorts.get(protoTmp);
    if(l != null) {
      l.remove(port);
    }
  }
View Full Code Here

    public String getHttpType() {
        return httpType;
    }

    public String getField(String key) {
        return (String) fields.get(new CaseInsensitiveString(key));
    }
View Full Code Here

        httpType = type;
    }

    public void setField(String key, String value) {
        if (value != null) {
            fields.put(new CaseInsensitiveString(key), value);
        } else {
            fields.remove(new CaseInsensitiveString(key));
        }
    }
View Full Code Here

        BufferedWriter outWriter = new BufferedWriter(new OutputStreamWriter(baos));
        outWriter.write(firstLine);
        outWriter.write(DELIMITER);
        Enumeration e = fields.keys();
        while (e.hasMoreElements()) {
            CaseInsensitiveString key = (CaseInsensitiveString) e.nextElement();
            String value = (String) fields.get(key);
            outWriter.write(key.toString() + ": " + value);
            outWriter.write(DELIMITER);
        }
        outWriter.write(DELIMITER);
        outWriter.flush();
View Full Code Here

     */
    public String toString() {
        StringBuffer sb = new StringBuffer();
        Enumeration e = fields.keys();
        while (e.hasMoreElements()) {
            CaseInsensitiveString key = (CaseInsensitiveString) e.nextElement();
            String value = (String) fields.get(key);
            sb.append(key.toString() + "=" + value);
            sb.append("\n");
        }
        if (payload != null) {
            sb.append("-------------\nPayload size: " + payload.length + "\n");
        }
View Full Code Here

TOP

Related Classes of jade.core.CaseInsensitiveString

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.