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

org.infinispan.server.configuration.SocketBindingConfiguration Maven / Gradle / Ivy

The newest version!
package org.infinispan.server.configuration;

import org.infinispan.commons.configuration.attributes.AttributeDefinition;
import org.infinispan.commons.configuration.attributes.AttributeSet;
import org.infinispan.commons.configuration.attributes.ConfigurationElement;

public class SocketBindingConfiguration extends ConfigurationElement {

   static final AttributeDefinition NAME = AttributeDefinition.builder(Attribute.NAME, null, String.class).build();
   static final AttributeDefinition PORT = AttributeDefinition.builder(Attribute.PORT, null, Integer.class).build();
   static final AttributeDefinition INTERFACE = AttributeDefinition.builder(Attribute.INTERFACE, null, String.class).build();
   private final InterfaceConfiguration interfaceConfiguration;

   static AttributeSet attributeDefinitionSet() {
      return new AttributeSet(SocketBindingConfiguration.class, NAME, PORT, INTERFACE);
   }

   SocketBindingConfiguration(AttributeSet attributes, InterfaceConfiguration interfaceConfiguration) {
      super(Element.SOCKET_BINDING, attributes);
      this.interfaceConfiguration = interfaceConfiguration;
   }

   public String name() {
      return attributes.attribute(NAME).get();
   }

   public String interfaceName() {
      return attributes.attribute(INTERFACE).get();
   }

   public int port() {
      return attributes.attribute(PORT).get();
   }

   public InterfaceConfiguration interfaceConfiguration() {
      return interfaceConfiguration;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy