net.floodlightcontroller.linkdiscovery.web
Class LinkWithType

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonSerializer<LinkWithType>
      extended by net.floodlightcontroller.linkdiscovery.web.LinkWithType
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class LinkWithType
extends com.fasterxml.jackson.databind.JsonSerializer<LinkWithType>

This class is both the datastructure and the serializer for a link with the corresponding type of link.

Author:
alexreimers

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
 
Field Summary
 ILinkDiscovery.LinkDirection direction
           
 int dstPort
           
 long dstSwDpid
           
 int srcPort
           
 long srcSwDpid
           
 ILinkDiscovery.LinkType type
           
 
Constructor Summary
LinkWithType()
           
LinkWithType(Link link, ILinkDiscovery.LinkType type, ILinkDiscovery.LinkDirection direction)
           
 
Method Summary
 java.lang.Class<LinkWithType> handledType()
           
 void serialize(LinkWithType lwt, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider arg2)
           
 
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, isEmpty, isUnwrappingSerializer, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

srcSwDpid

public long srcSwDpid

srcPort

public int srcPort

dstSwDpid

public long dstSwDpid

dstPort

public int dstPort

type

public ILinkDiscovery.LinkType type

direction

public ILinkDiscovery.LinkDirection direction
Constructor Detail

LinkWithType

public LinkWithType()

LinkWithType

public LinkWithType(Link link,
                    ILinkDiscovery.LinkType type,
                    ILinkDiscovery.LinkDirection direction)
Method Detail

serialize

public void serialize(LinkWithType lwt,
                      com.fasterxml.jackson.core.JsonGenerator jgen,
                      com.fasterxml.jackson.databind.SerializerProvider arg2)
               throws java.io.IOException,
                      com.fasterxml.jackson.core.JsonProcessingException
Specified by:
serialize in class com.fasterxml.jackson.databind.JsonSerializer<LinkWithType>
Throws:
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException

handledType

public java.lang.Class<LinkWithType> handledType()
Overrides:
handledType in class com.fasterxml.jackson.databind.JsonSerializer<LinkWithType>