java.beans.beancontext.BeanContextServices Java Examples

The following examples show how to use java.beans.beancontext.BeanContextServices. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Test4328406.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) {
    for (int i = 0; i < 10; i++) {
        BeanContextServices container = new BeanContextServicesSupport();
        BeanContextChild ms1 = new MyService1();
        BeanContextServices ms2 = new MyService2();
        BeanContextChild mb = new MyBean();

        container.add(ms1);
        container.add(ms2);
        ms2.add(mb);

        // exception thrown here
        container.remove(ms2);
    }
}
 
Example #2
Source File: Test4328406.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) {
    for (int i = 0; i < 10; i++) {
        BeanContextServices container = new BeanContextServicesSupport();
        BeanContextChild ms1 = new MyService1();
        BeanContextServices ms2 = new MyService2();
        BeanContextChild mb = new MyBean();

        container.add(ms1);
        container.add(ms2);
        ms2.add(mb);

        // exception thrown here
        container.remove(ms2);
    }
}
 
Example #3
Source File: Test4328406.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #4
Source File: BeanContextServiceAvailableEvent.java    From Java8CN with Apache License 2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #5
Source File: BeanContextServiceAvailableEvent.java    From jdk-1.7-annotated with Apache License 2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #6
Source File: Test4328406.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
    return this;
}
 
Example #7
Source File: Test4328406.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
    return this;
}
 
Example #8
Source File: Test4328406.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected void releaseBeanContextResources() {
    super.releaseBeanContextResources();

    BeanContextServices bcs = (BeanContextServices) getBeanContext();
    bcs.revokeService(this.getClass(), this, true);
}
 
Example #9
Source File: Test4328406.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
    return this;
}
 
Example #10
Source File: Test4328406.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected void initializeBeanContextResources() {
    super.initializeBeanContextResources();

    BeanContextServices bcs = (BeanContextServices) getBeanContext();
    bcs.addService(this.getClass(), this);
}
 
Example #11
Source File: BeanContextServiceAvailableEvent.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #12
Source File: Test4328406.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void releaseService(BeanContextServices bcs, Object requestor, Object
        service) {
}
 
Example #13
Source File: Test4328406.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected void releaseBeanContextResources() {
    super.releaseBeanContextResources();

    BeanContextServices bcs = (BeanContextServices) getBeanContext();
    bcs.revokeService(this.getClass(), this, true);
}
 
Example #14
Source File: Test4328406.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected void initializeBeanContextResources() {
    super.initializeBeanContextResources();

    BeanContextServices bcs = (BeanContextServices) getBeanContext();
    bcs.addService(this.getClass(), this);
}
 
Example #15
Source File: Test4328406.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #16
Source File: BeanContextServiceAvailableEvent.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #17
Source File: Test4328406.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public void releaseService(BeanContextServices bcs, Object requestor, Object
        service) {
}
 
Example #18
Source File: Test4328406.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
    return this;
}
 
Example #19
Source File: BeanContextServiceAvailableEvent.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #20
Source File: Test4328406.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
    return this;
}
 
Example #21
Source File: BeanContextServiceAvailableEvent.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}
 
Example #22
Source File: Test4328406.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #23
Source File: Test4328406.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #24
Source File: Test4328406.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #25
Source File: Test4328406.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #26
Source File: Test4328406.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #27
Source File: Test4328406.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void releaseService(BeanContextServices bcs, Object requestor, Object
        service) {
}
 
Example #28
Source File: Test4328406.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
    return null;
}
 
Example #29
Source File: Test4328406.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected void releaseBeanContextResources() {
    super.releaseBeanContextResources();

    BeanContextServices bcs = (BeanContextServices) getBeanContext();
    bcs.revokeService(this.getClass(), this, true);
}
 
Example #30
Source File: BeanContextServiceAvailableEvent.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Construct a <code>BeanContextAvailableServiceEvent</code>.
 * @param bcs The context in which the service has become available
 * @param sc A <code>Class</code> reference to the newly available service
 */
public BeanContextServiceAvailableEvent(BeanContextServices bcs, Class sc) {
    super((BeanContext)bcs);

    serviceClass = sc;
}