org.osgi.service.component.annotations.Component Java Examples

The following examples show how to use org.osgi.service.component.annotations.Component. 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: CfmWebComponent.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * On deactivation of this component unregister these codecs from the codec service.
 */
@Deactivate
public void deactivate() {
    log.info("CFM Web Component Stopped");
    codecService.unregisterCodec(MaintenanceDomain.class);
    codecService.unregisterCodec(MaintenanceAssociation.class);
    codecService.unregisterCodec(org.onosproject.incubator.net.l2monitoring.cfm.Component.class);
    codecService.unregisterCodec(VlanId.class);
    codecService.unregisterCodec(Mep.class);
    codecService.unregisterCodec(MepEntry.class);
    codecService.unregisterCodec(MepLbCreate.class);
    codecService.unregisterCodec(MepLbEntry.class);
    codecService.unregisterCodec(MepLtCreate.class);
    codecService.unregisterCodec(RemoteMepEntry.class);
    codecService.unregisterCodec(FngAddress.class);

    codecService.unregisterCodec(DelayMeasurementCreate.class);
    codecService.unregisterCodec(DelayMeasurementEntry.class);
    codecService.unregisterCodec(DelayMeasurementStat.class);
    codecService.unregisterCodec(DelayMeasurementStatCurrent.class);
    codecService.unregisterCodec(DelayMeasurementStatHistory.class);
    codecService.unregisterCodec(MeasurementOption.class);
    codecService.unregisterCodec(StartTime.class);
    codecService.unregisterCodec(StopTime.class);

    codecService.unregisterCodec(LossMeasurementCreate.class);
    codecService.unregisterCodec(LossMeasurementThreshold.class);
    codecService.unregisterCodec(LossMeasurementEntry.class);
    codecService.unregisterCodec(LossMeasurementStat.class);
    codecService.unregisterCodec(LossMeasurementStatCurrent.class);
    codecService.unregisterCodec(LossMeasurementStatHistory.class);
    codecService.unregisterCodec(LossAvailabilityStat.class);
    codecService.unregisterCodec(LossAvailabilityStatCurrent.class);
    codecService.unregisterCodec(LossAvailabilityStatHistory.class);
    codecService.unregisterCodec(CounterOption.class);
    codecService.unregisterCodec(LossMeasurementThreshold.ThresholdOption.class);

}
 
Example #2
Source File: DistributedMdStore.java    From onos with Apache License 2.0 5 votes vote down vote up
@Activate
public void activate() {
    maintenanceDomainConsistentMap = storageService
            .<MdId, MaintenanceDomain>consistentMapBuilder()
            .withName("onos-cfm-ma-map")
            .withSerializer(Serializer.using(new KryoNamespace.Builder()
                    .register(KryoNamespaces.API)
                    .register(DefaultMaintenanceDomain.class)
                    .register(MdIdCharStr.class)
                    .register(MdIdDomainName.class)
                    .register(MdIdMacUint.class)
                    .register(MdIdNone.class)
                    .register(MaintenanceDomain.MdLevel.class)
                    .register(DefaultMaintenanceAssociation.class)
                    .register(MaIdCharStr.class)
                    .register(MaIdShort.class)
                    .register(MaId2Octet.class)
                    .register(MaIdIccY1731.class)
                    .register(MaIdPrimaryVid.class)
                    .register(MaIdRfc2685VpnId.class)
                    .register(MaintenanceAssociation.CcmInterval.class)
                    .register(DefaultComponent.class)
                    .register(MepId.class)
                    .register(Identifier.class)
                    .register(InternetDomainName.class)
                    .register(MacAddress.class)
                    .register(ImmutablePair.class)
                    .register(org.onosproject.incubator.net.l2monitoring.cfm.Component.MhfCreationType.class)
                    .register(org.onosproject.incubator.net.l2monitoring.cfm.Component.IdPermissionType.class)
                    .register(org.onosproject.incubator.net.l2monitoring.cfm.Component.TagType.class)
                    .build("md")))
            .build();
    mapListener = new InternalMdListener();
    maintenanceDomainConsistentMap.addListener(mapListener);

    maintenanceDomainMap = maintenanceDomainConsistentMap.asJavaMap();
    log.info("MDStore started");
}
 
Example #3
Source File: CfmWebComponent.java    From onos with Apache License 2.0 4 votes vote down vote up
/**
 * On activation of this component register these codecs with the codec service.
 */
@Activate
public void activate() {
    codecService.registerCodec(MaintenanceDomain.class,
                                    new MaintenanceDomainCodec());
    codecService.registerCodec(MaintenanceAssociation.class,
                                    new MaintenanceAssociationCodec());
    codecService.registerCodec(org.onosproject.incubator.net.l2monitoring.cfm.Component.class,
                                    new ComponentCodec());
    codecService.registerCodec(VlanId.class, new VidCodec());
    codecService.registerCodec(Mep.class, new MepCodec());
    codecService.registerCodec(MepEntry.class, new MepEntryCodec());
    codecService.registerCodec(MepLbCreate.class, new MepLbCreateCodec());
    codecService.registerCodec(MepLbEntry.class, new MepLbEntryCodec());
    codecService.registerCodec(MepLtCreate.class, new MepLtCreateCodec());
    codecService.registerCodec(RemoteMepEntry.class, new RemoteMepEntryCodec());
    codecService.registerCodec(FngAddress.class, new FngAddressCodec());


    codecService.registerCodec(DelayMeasurementCreate.class,
                                    new DmCreateCodec());
    codecService.registerCodec(DelayMeasurementEntry.class,
                                    new DmEntryCodec());
    codecService.registerCodec(DelayMeasurementStat.class,
                                    new DelayMeasurementStatCodec());
    codecService.registerCodec(DelayMeasurementStatCurrent.class,
                                    new DelayMeasurementStatCurrentCodec());
    codecService.registerCodec(DelayMeasurementStatHistory.class,
                                    new DelayMeasurementStatHistoryCodec());
    codecService.registerCodec(MeasurementOption.class,
                                    new DmMeasurementOptionCodec());

    codecService.registerCodec(LossMeasurementCreate.class,
                                    new LmCreateCodec());
    codecService.registerCodec(LossMeasurementThreshold.class,
                                    new LossMeasurementThresholdCodec());
    codecService.registerCodec(LossMeasurementEntry.class,
                                    new LmEntryCodec());
    codecService.registerCodec(LossMeasurementStat.class,
                                    new LossMeasurementStatCodec());
    codecService.registerCodec(LossMeasurementStatCurrent.class,
                                    new LossMeasurementStatCurrentCodec());
    codecService.registerCodec(LossMeasurementStatHistory.class,
                                    new LossMeasurementStatHistoryCodec());
    codecService.registerCodec(LossAvailabilityStat.class,
                                    new LossAvailabilityStatCodec());
    codecService.registerCodec(LossAvailabilityStatCurrent.class,
                                    new LossAvailabilityStatCurrentCodec());
    codecService.registerCodec(LossAvailabilityStatHistory.class,
                                    new LossAvailabilityStatHistoryCodec());
    codecService.registerCodec(CounterOption.class,
                                    new LmCounterOptionCodec());
    codecService.registerCodec(LossMeasurementThreshold.ThresholdOption.class,
                                    new LmThresholdOptionCodec());

    codecService.registerCodec(StartTime.class, new StartTimeCodec());
    codecService.registerCodec(StopTime.class, new StopTimeCodec());

    log.info("CFM Web Component Started");
}