Class LispMappingService

java.lang.Object
org.opendaylight.lispflowmapping.implementation.LispMappingService
All Implemented Interfaces:
AutoCloseable, EventListener, IFlowMapping, IMapNotifyHandler, IMapRequestResultHandler, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService, OdlLispProtoListener, org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>, org.opendaylight.yangtools.yang.binding.NotificationListener

public class LispMappingService extends Object implements IFlowMapping, IMapRequestResultHandler, IMapNotifyHandler, OdlLispProtoListener, AutoCloseable, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
  • Constructor Details

    • LispMappingService

      public LispMappingService(org.opendaylight.mdsal.binding.api.NotificationService notificationService, IMappingService mappingService, OdlLispSbService odlLispService, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService)
  • Method Details

    • shouldUseSmr

      public boolean shouldUseSmr()
    • setShouldUseSmr

      public void setShouldUseSmr(boolean shouldUseSmr)
      Description copied from interface: IFlowMapping
      Configure LISP mapping service to track and notify of changes mapping requesters.
      Specified by:
      setShouldUseSmr in interface IFlowMapping
      Parameters:
      shouldUseSmr - Configure state of service
    • getNotificationService

      public org.opendaylight.mdsal.binding.api.NotificationService getNotificationService()
    • initialize

      public void initialize()
    • basicInit

      public void basicInit()
    • handleMapRequest

      public MapReply handleMapRequest(MapRequest request)
      Description copied from interface: IFlowMapping
      Handle southbound map-request.
      Specified by:
      handleMapRequest in interface IFlowMapping
      Parameters:
      request - The map-request messages
      Returns:
      a map-reply messages
    • handleMapRegister

      public org.apache.commons.lang3.tuple.Pair<MapNotify,List<TransportAddress>> handleMapRegister(MapRegister mapRegister)
      Description copied from interface: IFlowMapping
      Handle southbound map-request.
      Specified by:
      handleMapRegister in interface IFlowMapping
      Parameters:
      mapRegister - The map-register message
      Returns:
      a map-notify message, if requested in the map-register or null otherwise
    • setShouldAuthenticate

      public void setShouldAuthenticate(boolean shouldAuthenticate)
    • onAddMapping

      public void onAddMapping(AddMapping mapRegisterNotification)
      Specified by:
      onAddMapping in interface OdlLispProtoListener
    • onRequestMapping

      public void onRequestMapping(RequestMapping mapRequestNotification)
      Specified by:
      onRequestMapping in interface OdlLispProtoListener
    • onGotMapReply

      public void onGotMapReply(GotMapReply notification)
      Specified by:
      onGotMapReply in interface OdlLispProtoListener
    • onGotMapNotify

      public void onGotMapNotify(GotMapNotify notification)
      Specified by:
      onGotMapNotify in interface OdlLispProtoListener
    • onXtrRequestMapping

      public void onXtrRequestMapping(XtrRequestMapping notification)
      Specified by:
      onXtrRequestMapping in interface OdlLispProtoListener
    • onXtrReplyMapping

      public void onXtrReplyMapping(XtrReplyMapping notification)
      Specified by:
      onXtrReplyMapping in interface OdlLispProtoListener
    • onMappingKeepAlive

      public void onMappingKeepAlive(MappingKeepAlive notification)
      Specified by:
      onMappingKeepAlive in interface OdlLispProtoListener
    • handleMapReply

      public void handleMapReply(MapReply reply)
      Description copied from interface: IMapRequestResultHandler
      Handle return map-reply message.
      Specified by:
      handleMapReply in interface IMapRequestResultHandler
      Parameters:
      reply - The map-reply message
    • handleMapNotify

      public void handleMapNotify(MapNotify notify, List<TransportAddress> rlocs)
      Description copied from interface: IMapNotifyHandler
      Handle map-notify message.
      Specified by:
      handleMapNotify in interface IMapNotifyHandler
      Parameters:
      notify - The map-notify message
      rlocs - A list of RLOCs which need to be notified
    • handleSMR

      public void handleSMR(MapRequest smrMapRequest, Rloc subscriber)
      Description copied from interface: IMapNotifyHandler
      Handle Solicit Map Request message.
      Specified by:
      handleSMR in interface IMapNotifyHandler
      Parameters:
      smrMapRequest - the SMR message
      subscriber - The address of the subscriber that should be SMRed
    • handleNonProxyMapRequest

      public void handleNonProxyMapRequest(MapRequest mapRequest, TransportAddress transportAddress)
      Description copied from interface: IMapRequestResultHandler
      Handle map-request to be forwarded to authoritative ETR.
      Specified by:
      handleNonProxyMapRequest in interface IMapRequestResultHandler
      Parameters:
      mapRequest - The map-request message
      transportAddress - The address of the ETR
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • instantiateServiceInstance

      public void instantiateServiceInstance()
      Specified by:
      instantiateServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
    • closeServiceInstance

      public com.google.common.util.concurrent.ListenableFuture<Void> closeServiceInstance()
      Specified by:
      closeServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
    • getIdentifier

      public org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
      Specified by:
      getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>