Examples of ControlException


Examples of org.apache.beehive.controls.api.ControlException

        // Services are always provided by the parent context.
        //
        ControlBeanContext cbc = getControlBeanContext();
        BeanContext bc = cbc.getBeanContext();
        if (bc == null || !(bc instanceof BeanContextServices))
            throw new ControlException("Can't locate service context: " + bc);

        //
        // Call getService on the parent context, using this bean as the requestor and the
        // associated peer context instance as the child and event listener parameters.
        //
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

                    break;
                }
            }
            if (!found)
            {
                throw new ControlException("Can't find base control interface for " + controlIntf);
            }
        }
        return controlIntf;
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

            }

            //
            // Version requirement failed
            //
            throw new ControlException( "Control extension " + intfName + " fails version requirement: requires interface version " +
                    majorRequired + "." + minorRequired + ", found interface version " +
                    majorPresent + "." + minorPresent + "." );
        }
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

     * Called during XMLDecoder reconstruction of a ControlBean.
     */
    public void decodeImpl(Object impl)
    {
        if (impl != _control)
            throw new ControlException("Cannot change implementation");
    };
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

            ControlFactory factory = (ControlFactory)factoryClass.newInstance();
            return factory.instantiate( beanClass, props, context, id );
        }
        catch ( Exception e )
        {
            throw new ControlException( "Exception creating ControlBean", e );
        }
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

                {
                    e = e.getCause();
                }
            }
               
            throw new ControlException( "Exception trying to run client initializer: " + e.getClass().getName() + ", " +
                                        e.getMessage(), e );
        }
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

            catch(NoSuchMethodException nsmEx)
            {
                // This can only happen if a PropertySet is incompatibly changed after
                // serialization of a PropertyKey (since it is initially validated in
                // the constructor).
                throw new ControlException("Unable to locate PropertyKey accessor method", nsmEx);
            }
        }
        return _getMethod;
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

            ret = ctor.newInstance(context, id, props);
        }
        catch (InvocationTargetException ite)
        {
            Throwable t = ite.getCause();
            throw new ControlException("ControlBean constructor exception", t);
        }
        catch (Exception e)
        {
            throw new ControlException("Exception creating ControlBean", e);
        }

        return ret;
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

                                        _implClass.getName() + "Initializer");
                _implInitializer = (ImplInitializer)initClass.newInstance();
            }
            catch (Exception e)
            {
                throw new ControlException("Control initialization failure", e);
            }
        }
        return _implInitializer;
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.ControlException

                // annotation, else downstream requirements (such as having a valid control init
                // class) will not be met.
                //
                if (_implClass.getAnnotation(ControlImplementation.class) == null)
                {
                    throw new ControlException("@org.apache.beehive.controls.api.bean.ControlImplementation annotation is missing from control implementation class: " + _implClass.getName());
                }
            }
            catch (ClassNotFoundException cnfe)
            {
                throw new ControlException("Unable to load control implementation: "  + implBinding, cnfe);
            }

            //
            // Cache the threading policy associated with the impl
            //
            Threading thr = (Threading)_implClass.getAnnotation(Threading.class);
            if ( thr != null )
                _threadingPolicy = thr.value();
            else
                _threadingPolicy = ThreadingPolicy.SINGLE_THREADED;    // default to single-threaded

            ensureThreadingBehaviour();

            try
            {
                //
                // Create and initialize the new instance
                //
                _control = _implClass.newInstance();

                try
                {
                    getImplInitializer().initialize(this, _control);
                    _hasServices = true;
                }
                catch (Exception e)
                {
                    throw new ControlException("Control initialization failure", e);
                }

                //
                // Once the control is initialized, then allow the associated context
                // to do any initialization.
                //
                ControlBeanContext cbcs = (ControlBeanContext)getBeanContextProxy();
                cbcs.initializeControl();
            }
            catch (RuntimeException re) { throw re; }   // never mask RuntimeExceptions
            catch (Exception e)
            {
                throw new ControlException("Unable to create control instance", e);
            }
        }

        //
        // If the implementation instance does not currently have contextual services, they
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.