com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion. 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: MonitorBase.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #2
Source File: ManagementAssertionCreator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #3
Source File: ManagementPolicyValidator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #4
Source File: ManagementPolicyValidator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #5
Source File: MonitorBase.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #6
Source File: ManagementAssertionCreator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #7
Source File: ManagementPolicyValidator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #8
Source File: ManagementPolicyValidator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #9
Source File: MonitorBase.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #10
Source File: ManagementAssertionCreator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #11
Source File: ManagementPolicyValidator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #12
Source File: ManagementPolicyValidator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #13
Source File: MonitorBase.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #14
Source File: ManagementAssertionCreator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #15
Source File: ManagementPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #16
Source File: ManagementPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #17
Source File: MonitorBase.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #18
Source File: ManagementAssertionCreator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #19
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #20
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #21
Source File: MonitorBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #22
Source File: ManagementAssertionCreator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #23
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #24
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #25
Source File: MonitorBase.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #26
Source File: ManagementAssertionCreator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}
 
Example #27
Source File: ManagementPolicyValidator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #28
Source File: ManagementPolicyValidator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example #29
Source File: MonitorBase.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Client monitoring is OFF by default because there is
 * no standard stub.close() method.  Therefore people do
 * not typically close a stub when they are done with it
 * (even though the RI does provide a .close).
 * <pre>
 * prop    |  no assert | assert/no mon | assert/mon off | assert/mon on
 * -------------------------------------------------------------------
 * not set |    off     |      off      |     off        |     on
 * false   |    off     |      off      |     off        |     off
 * true    |    on      |      on       |     off        |     on
 * </pre>
*/
@NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
    EndpointAddress ea = stub.requestContext.getEndpointAddress();
    if (ea == null) {
        return ManagedObjectManagerFactory.createNOOP();
    }

    String rootName = ea.toString();

    final ManagedClientAssertion assertion =
        ManagedClientAssertion.getAssertion(stub.getPortInfo());
    if (assertion != null) {
        final String id = assertion.getId();
        if (id != null) {
            rootName = id;
        }
        if (assertion.monitoringAttribute() == Setting.OFF) {
            return disabled("This client", rootName);
        } else if (assertion.monitoringAttribute() == Setting.ON &&
                   clientMonitoring != Setting.OFF) {
            return createMOMLoop(rootName, 0);
        }
    }

    if (clientMonitoring == Setting.NOT_SET ||
        clientMonitoring == Setting.OFF)
    {
        return disabled("Global client", rootName);
    }
    return createMOMLoop(rootName, 0);
}
 
Example #30
Source File: ManagementAssertionCreator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
        AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
    final QName name = data.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
        return new ManagedServiceAssertion(data, assertionParameters);
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
        return new ManagedClientAssertion(data, assertionParameters);
    }
    else {
        return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
    }
}