Package org.cipango.sipapp

Examples of org.cipango.sipapp.SipAppContext$Factory


   */
  public void setHandler(String name) throws ServletException
  {
    checkValid();
   
    SipAppContext context = _appSession.getContext();
    SipServletHolder handler = context.getSipServletHandler().getHolder(name);
   
    if (handler == null)
      throw new ServletException("No handler named " + name);
   
    setHandler(handler);
View Full Code Here


 
  public void invalidateIfReady()
  {
    if (isValid() && getInvalidateWhenReady() && isReadyToInvalidate())
    {
      SipAppContext context = _appSession.getContext();
      SipSessionListener[] listeners = context.getSipSessionListeners();
      if (listeners.length > 0)
        context.fire(listeners, AppSession.__sessionReadyToInvalidate, new SipSessionEvent(this));
     
      if (isValid() && getInvalidateWhenReady())
        invalidate();
    }
  }
View Full Code Here

        SipServlet annotation = (SipServlet) clazz.getAnnotation(SipServlet.class);
       
       
        SipServletHolder holder = new SipServletHolder();
       
        SipAppContext context = (SipAppContext) _context;
   
        if (!Util.isEmpty(annotation.applicationName()))
        {
         
          if (context.getName() != null && !context.getName().equals(annotation.applicationName()))
          throw new IllegalStateException("App-name in sip.xml: " + context.getName()
              + " does not match with SipApplication annotation: " + annotation.applicationName());
          context.getSipMetaData().setAppName(annotation.applicationName());
        }
       
        if (annotation.name() != null && !"".equals(annotation.name()))
          holder.setName(annotation.name());
        else
          holder.setName(_className.substring(_className.lastIndexOf('.') + 1));
       
        holder.setInitOrder(annotation.loadOnStartup());
        holder.setDisplayName(annotation.description());
        holder.setClassName(_className);
       
        context.addSipServlet(holder);
    }
View Full Code Here

        }
       
        SipListener annotation = (SipListener) clazz.getAnnotation(SipListener.class);
       
  
        SipAppContext context = (SipAppContext) _context;
   
        if (!Util.isEmpty(annotation.applicationName()))
        {
         
          if (context.getName() != null && !context.getName().equals(annotation.applicationName()))
          throw new IllegalStateException("App-name in sip.xml: " + context.getName()
              + " does not match with SipApplication annotation: " + annotation.applicationName());
          context.getSipMetaData().setAppName(annotation.applicationName());
        }
 
        context.getSipMetaData().addListener(_className);
    }
View Full Code Here

    {
      context.addDecorator(new AnnotationDecorator(context));
      
        AnnotationParser parser = new AnnotationParser();

        SipAppContext sac = (SipAppContext) context;
        if (sac.getSpecVersion() == SipAppContext.VERSION_10)
          return;
       
        if (Log.isDebugEnabled())
          Log.debug("parsing annotations");
       
View Full Code Here

       
    
        SipApplication annotation = (SipApplication) clazz.getAnnotation(SipApplication.class);
       
  
        SipAppContext context = (SipAppContext) _context;
       
    if (context.getName() != null && !context.getName().equals(annotation.name()))
      throw new IllegalStateException("App-name in sip.xml: " + context.getName()
          + " does not match with SipApplication annotation: " + annotation.name());
    context.getSipMetaData().setAppName(annotation.name());
   
    context.setDistributable(annotation.distributable());
    context.setDisplayName(annotation.displayName());
    context.setProxyTimeout(annotation.proxyTimeout());
    context.setSessionTimeout(annotation.sessionTimeout());
        context.getSipMetaData().setMainServletName(annotation.mainServlet());
    }
View Full Code Here

TOP

Related Classes of org.cipango.sipapp.SipAppContext$Factory

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.