Package net.jxta.protocol

Examples of net.jxta.protocol.PeerAdvertisement


        //System.out.println("peer Advertisement: " + responderAdvString);
        try {
            // create a peer advertisement
            InputStream is = new ByteArrayInputStream(responderAdvString
                    .getBytes());
            PeerAdvertisement responderAdv = (PeerAdvertisement) AdvertisementFactory
                    .newAdvertisement(_XML_MIME_TYPE, is);
            System.out.println(" [  Got a Discovery Response ["
                    + response.getResponseCount() + " elements] from peer: "
                    + responderAdv.getName() + " ]");

            String peerID = (responderAdv.getPeerID()).toString();
            _resolverService.sendQuery(peerID, _actorQueryMessage);
        } catch (java.io.IOException e) {
            // bogus peer, skip this message alltogether.
            System.out.println("Warning: cannot parse remote "
                    + "peer's advertisement.\n" + e.getMessage());
View Full Code Here

TOP

Related Classes of net.jxta.protocol.PeerAdvertisement

Copyright © 2018 www.massapicom. 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.