Examples of LinkInfo


Examples of edu.stanford.bmir.protege.web.server.render.LinkInfo

    private void verifyLink(String scheme, String extension) {
        String link = scheme + "://other.com/img." + extension;
        assertThat(scheme + " and ." + extension + " is not renderable as link",
                renderer.isRenderableAsLink(link), is(true));
        LinkInfo linkInfo = renderer.renderLink(link);
        assertThat(scheme + " and ." + extension + " failed", linkInfo, is(not((LinkInfo) null)));
        assertThat(linkInfo.getLinkAddress(), is(equalTo(link)));
    }
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        Set<LinkWithType> returnLinkSet = new HashSet<LinkWithType>();

        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) {
                    LinkWithType lwt;

                    long src = link.getSrc();
                    long dst = link.getDst();
                    short srcPort = link.getSrcPort();
                    short dstPort = link.getDstPort();
                    Link otherLink = new Link(dst, dstPort, src, srcPort);
                    LinkInfo otherInfo = links.get(otherLink);
                    LinkType otherType = null;
                    if (otherInfo != null)
                        otherType = ld.getLinkType(otherLink, otherInfo);
                    if (otherType == LinkType.DIRECT_LINK ||
                            otherType == LinkType.TUNNEL) {
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        Set<LinkWithType> returnLinkSet = new HashSet<LinkWithType>();

        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.MULTIHOP_LINK) {
                    LinkWithType lwt;

                    long src = link.getSrc();
                    long dst = link.getDst();
                    short srcPort = link.getSrcPort();
                    short dstPort = link.getDstPort();
                    Link otherLink = new Link(dst, dstPort, src, srcPort);
                    LinkInfo otherInfo = links.get(otherLink);
                    LinkType otherType = null;
                    if (otherInfo != null)
                        otherType = ld.getLinkType(otherLink, otherInfo);
                    if (otherType == LinkType.MULTIHOP_LINK) {
                        // This is a bi-direcitonal link.
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        Set<LinkWithType> returnLinkSet = new HashSet<LinkWithType>();

        if (ld != null) {
            links.putAll(ld.getLinks());
            for (Link link: links.keySet()) {
                LinkInfo info = links.get(link);
                LinkType type = ld.getLinkType(link, info);
                if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) {
                    LinkWithType lwt = new LinkWithType(link,
                            type,LinkDirection.UNIDIRECTIONAL);
                    returnLinkSet.add(lwt);
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        // (Switch 4) --> (Switch 3) --> (Switch 2) --> (Switch 1)
        Map<Link, LinkInfo> links = new HashMap<Link, LinkInfo>();
        Link link = new Link(2L, (short) 3, 1L, (short) 1);
        Link link2 = new Link(3L, (short) 3, 2L, (short) 1);
        Link link3 = new Link(4L, (short) 3, 3L, (short) 1);
        LinkInfo linkinfo = null;
        links.put(link, linkinfo);
        links.put(link2, linkinfo);
        links.put(link3, linkinfo);

        // Make sure that the link discovery service provides the link we made
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        // (Switch 2 output port 3) --> (Switch 1 input port 1)
        Map<Link, LinkInfo> links = new HashMap<Link, LinkInfo>();
        Link link = new Link(2L, (short) 3, 1L, (short) 1);
        Link link2 = new Link(3L, (short) 3, 1L, (short) 1);
        Link link3 = new Link(4L, (short) 3, 1L, (short) 1);
        LinkInfo linkinfo = null;
        links.put(link, linkinfo);
        links.put(link2, linkinfo);
        links.put(link3, linkinfo);

        // Make sure that the link discovery service provides the link we made
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

    }

    @Override
    public LinkInfo getLinkInfo(Link link) {
        lock.readLock().lock();
        LinkInfo linkInfo = links.get(link);
        LinkInfo retLinkInfo = null;
        if (linkInfo != null) {
            retLinkInfo  = new LinkInfo(linkInfo);
        }
        lock.readLock().unlock();
        return retLinkInfo;
    }
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        if (isStandard)
            lastLldpTime = System.currentTimeMillis();
        else
            lastBddpTime = System.currentTimeMillis();

        LinkInfo newLinkInfo = new LinkInfo(firstSeenTime, lastLldpTime,
                                            lastBddpTime);

        addOrUpdateLink(lt, newLinkInfo);

        // Check if reverse link exists.
        // If it doesn't exist and if the forward link was seen
        // first seen within a small interval, send probe on the
        // reverse link.
        newLinkInfo = links.get(lt);
        if (newLinkInfo != null && isStandard && isReverse == false) {
            Link reverseLink = new Link(lt.getDst(), lt.getDstPort(),
                                        lt.getSrc(), lt.getSrcPort());
            LinkInfo reverseInfo = links.get(reverseLink);
            if (reverseInfo == null) {
                // the reverse link does not exist.
                if (newLinkInfo.getFirstSeenTime() > System.currentTimeMillis()
                                                     - LINK_TIMEOUT) {
                    this.sendDiscoveryMessage(lt.getDst(), lt.getDstPort(),
                                              isStandard, true);
                }
            }
        }

        // If the received packet is a BDDP packet, then create a reverse BDDP
        // link as well.
        if (!isStandard) {
            Link reverseLink = new Link(lt.getDst(), lt.getDstPort(),
                                        lt.getSrc(), lt.getSrcPort());

            // srcPortState and dstPort state are reversed.
            LinkInfo reverseInfo = new LinkInfo(firstSeenTime, lastLldpTime,
                                                lastBddpTime);

            addOrUpdateLink(reverseLink, reverseInfo);
        }
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

        boolean linkChanged = false;

        lock.writeLock().lock();
        try {
            // put the new info. if an old info exists, it will be returned.
            LinkInfo oldInfo = links.put(lt, newInfo);
            if (oldInfo != null
                    && oldInfo.getFirstSeenTime() < newInfo.getFirstSeenTime())
                newInfo.setFirstSeenTime(oldInfo.getFirstSeenTime());

            if (log.isTraceEnabled()) {
                log.trace("addOrUpdateLink: {} {}",
                          lt,
                          (newInfo.getMulticastValidTime() != null) ? "multicast"
View Full Code Here

Examples of net.floodlightcontroller.linkdiscovery.LinkInfo

                    this.portLinks.get(dstNpt).remove(lt);
                    if (this.portLinks.get(dstNpt).isEmpty())
                                                             this.portLinks.remove(dstNpt);
                }

                LinkInfo info = this.links.remove(lt);
                LinkType linkType = getLinkType(lt, info);
                linkUpdateList.add(new LDUpdate(lt.getSrc(),
                                                lt.getSrcPort(),
                                                lt.getDst(),
                                                lt.getDstPort(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.