Class LispMappingService
- java.lang.Object
-
- org.opendaylight.lispflowmapping.implementation.LispMappingService
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.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 java.lang.Object implements IFlowMapping, IMapRequestResultHandler, IMapNotifyHandler, OdlLispProtoListener, java.lang.AutoCloseable, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
-
Constructor Summary
Constructors Constructor Description LispMappingService(org.opendaylight.mdsal.binding.api.NotificationService notificationService, IMappingService mappingService, OdlLispSbService odlLispService, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
basicInit()
void
close()
com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
closeServiceInstance()
org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier
getIdentifier()
org.opendaylight.mdsal.binding.api.NotificationService
getNotificationService()
void
handleMapNotify(MapNotify notify, java.util.List<TransportAddress> rlocs)
Handle map-notify message.org.apache.commons.lang3.tuple.Pair<MapNotify,java.util.List<TransportAddress>>
handleMapRegister(MapRegister mapRegister)
Handle southbound map-request.void
handleMapReply(MapReply reply)
Handle return map-reply message.MapReply
handleMapRequest(MapRequest request)
Handle southbound map-request.void
handleNonProxyMapRequest(MapRequest mapRequest, TransportAddress transportAddress)
Handle map-request to be forwarded to authoritative ETR.void
handleSMR(MapRequest smrMapRequest, Rloc subscriber)
Handle Solicit Map Request message.void
initialize()
void
instantiateServiceInstance()
void
onAddMapping(AddMapping mapRegisterNotification)
void
onGotMapNotify(GotMapNotify notification)
void
onGotMapReply(GotMapReply notification)
void
onMappingKeepAlive(MappingKeepAlive notification)
void
onRequestMapping(RequestMapping mapRequestNotification)
void
onXtrReplyMapping(XtrReplyMapping notification)
void
onXtrRequestMapping(XtrRequestMapping notification)
void
setShouldAuthenticate(boolean shouldAuthenticate)
void
setShouldUseSmr(boolean shouldUseSmr)
Configure LISP mapping service to track and notify of changes mapping requesters.boolean
shouldUseSmr()
-
-
-
Constructor Detail
-
LispMappingService
public LispMappingService(org.opendaylight.mdsal.binding.api.NotificationService notificationService, IMappingService mappingService, OdlLispSbService odlLispService, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService)
-
-
Method Detail
-
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 interfaceIFlowMapping
- 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 interfaceIFlowMapping
- Parameters:
request
- The map-request messages- Returns:
- a map-reply messages
-
handleMapRegister
public org.apache.commons.lang3.tuple.Pair<MapNotify,java.util.List<TransportAddress>> handleMapRegister(MapRegister mapRegister)
Description copied from interface:IFlowMapping
Handle southbound map-request.- Specified by:
handleMapRegister
in interfaceIFlowMapping
- 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 interfaceOdlLispProtoListener
-
onRequestMapping
public void onRequestMapping(RequestMapping mapRequestNotification)
- Specified by:
onRequestMapping
in interfaceOdlLispProtoListener
-
onGotMapReply
public void onGotMapReply(GotMapReply notification)
- Specified by:
onGotMapReply
in interfaceOdlLispProtoListener
-
onGotMapNotify
public void onGotMapNotify(GotMapNotify notification)
- Specified by:
onGotMapNotify
in interfaceOdlLispProtoListener
-
onXtrRequestMapping
public void onXtrRequestMapping(XtrRequestMapping notification)
- Specified by:
onXtrRequestMapping
in interfaceOdlLispProtoListener
-
onXtrReplyMapping
public void onXtrReplyMapping(XtrReplyMapping notification)
- Specified by:
onXtrReplyMapping
in interfaceOdlLispProtoListener
-
onMappingKeepAlive
public void onMappingKeepAlive(MappingKeepAlive notification)
- Specified by:
onMappingKeepAlive
in interfaceOdlLispProtoListener
-
handleMapReply
public void handleMapReply(MapReply reply)
Description copied from interface:IMapRequestResultHandler
Handle return map-reply message.- Specified by:
handleMapReply
in interfaceIMapRequestResultHandler
- Parameters:
reply
- The map-reply message
-
handleMapNotify
public void handleMapNotify(MapNotify notify, java.util.List<TransportAddress> rlocs)
Description copied from interface:IMapNotifyHandler
Handle map-notify message.- Specified by:
handleMapNotify
in interfaceIMapNotifyHandler
- Parameters:
notify
- The map-notify messagerlocs
- 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 interfaceIMapNotifyHandler
- Parameters:
smrMapRequest
- the SMR messagesubscriber
- 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 interfaceIMapRequestResultHandler
- Parameters:
mapRequest
- The map-request messagetransportAddress
- The address of the ETR
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
instantiateServiceInstance
public void instantiateServiceInstance()
- Specified by:
instantiateServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
closeServiceInstance
public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> closeServiceInstance()
- Specified by:
closeServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
getIdentifier
public org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
- Specified by:
getIdentifier
in interfaceorg.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
-
-