Package org.zoolu.sip.provider

Examples of org.zoolu.sip.provider.TransactionIdentifier


    
   /** Adds a new server <i>ts</i> */
   public void addServer(TransactionServer ts)
   {  //printlog("addServer(ts)",LogLevel.LOW);
      if (hasServer(ts)) return;
      TransactionIdentifier sid=ts.getTransactionId();
      s_clients.put(sid,new HashSet());
      Message request=new Message(ts.getRequestMessage());
      //printlog("creating a possible server 408 final response",LogLevel.LOW);
      Message resp=MessageFactory.createResponse(request,408,SipResponses.reasonOf(408),null);
      //printlog("DEBUG: addServer()\r\n"+resp,LogLevel.LOW);
View Full Code Here


   /** Appends a new client to server <i>ts</i>.
     * If server <i>ts</i> is new, adds it. */
   public void addClient(TransactionServer ts, Transaction tc)
   {  //printlog("addClient(ts,tc)",LogLevel.LOW);
      c_server.put(tc.getTransactionId(),ts);
      TransactionIdentifier sid=ts.getTransactionId();
      HashSet clients=(HashSet)s_clients.get(sid);
      if (clients==null) clients=new HashSet();
      clients.add(tc);
      s_clients.put(sid,clients);
      Message request=new Message(ts.getRequestMessage());
View Full Code Here

      s_response.put(sid,resp);
   }
  
   /** Removes a client. */
   public void removeClient(Transaction tc)
   {  TransactionIdentifier cid=tc.getTransactionId();
      TransactionServer ts=(TransactionServer)c_server.get(cid);
      if (ts==null) return;
      c_server.remove(cid);
      TransactionIdentifier sid=ts.getTransactionId();
      HashSet clients=(HashSet)s_clients.get(sid);
      if (clients==null) return;
      Transaction target=null;
      Transaction aux;
      for (Iterator i=clients.iterator(); i.hasNext(); )
View Full Code Here

      if (target!=null) clients.remove(target);
   }
  
   /** Removes all clients bound to server <i>ts</i>. */
   public void clearClients(TransactionServer ts)
   {  TransactionIdentifier sid=ts.getTransactionId();
      s_clients.remove(sid);
      s_clients.put(sid,new HashSet());
   }
View Full Code Here

      s_clients.put(sid,new HashSet());
   }

   /** Whether there is a server <i>ts</i>. */
   public boolean hasServer(TransactionServer ts)
   {  TransactionIdentifier sid=ts.getTransactionId();
      return s_clients.containsKey(sid);
   }
View Full Code Here

      return s_clients.containsKey(sid);
   }

   /** Removes server <i>ts</i>. */
   public void removeServer(TransactionServer ts)
   {  TransactionIdentifier sid=ts.getTransactionId();
      s_clients.remove(sid);
      s_response.remove(sid);
   }
View Full Code Here

   return (HashSet)s_clients.get(ts.getTransactionId());
   }
     
   /** Sets the final response for server <i>ts</i>. */
   public void setFinalResponse(TransactionServer ts, Message resp)
   {  TransactionIdentifier sid=ts.getTransactionId();
      s_response.remove(sid);
      s_response.put(sid,resp);
   }
View Full Code Here

TOP

Related Classes of org.zoolu.sip.provider.TransactionIdentifier

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.