All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.as.clustering.jgroups.subsystem.ProtocolServiceNameProvider Maven / Gradle / Ivy

There is a newer version: 34.0.0.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.clustering.jgroups.subsystem;

import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.msc.service.ServiceName;
import org.wildfly.clustering.service.ServiceNameProvider;

/**
 * @author Paul Ferraro
 */
public class ProtocolServiceNameProvider implements ServiceNameProvider {

    private final ServiceName name;

    public ProtocolServiceNameProvider(PathAddress address) {
        this(address.getParent(), address.getLastElement());
    }

    public ProtocolServiceNameProvider(PathAddress stackAddress, PathElement path) {
        this.name = StackResourceDefinition.Capability.JCHANNEL_FACTORY.getServiceName(stackAddress).append(path.getValue());
    }

    @Override
    public ServiceName getServiceName() {
        return this.name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy