Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.SipListener


    public Result validate(ConfigContextEvent cce) {
        Result result = super.validate(cce); // Before doing custom validation do basic validation
        String choice = cce.getChoice();
        try {
            if (choice.equals(StaticTest.ADD) || choice.equals(StaticTest.VALIDATE)) {
                final SipListener sl = (SipListener) cce.getObject();
                Config c = (Config) ((SipService) cce.getClassObject()).parent();
                String addr = sl.getExternalSipAddress();
                String port = sl.getExternalSipPort();
                if (sl.getType().equals("internal")) {
                    if (addr != null || port != null) {
                        result.failed(_strMgr.getString("ExternalIsFalse"));
                    }
                }
            }
           if (choice.equals(StaticTest.UPDATE)) {
              if(ServerTags.EXTERNAL_SIP_ADDRESS.equals(cce.getName()) || ServerTags.EXTERNAL_SIP_PORT.equals(cce.getName())) {
                    final SipListener sl = (SipListener) cce.getClassObject();
                    final Config c = (Config) ((SipService) sl.parent()).parent();
                    if (sl.getType().equals("internal")) {
                            result.failed(_strMgr.getString("ExternalIsFalse"));
                    }
              } 
           }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.SipListener

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.