Package net.jxta.protocol

Examples of net.jxta.protocol.PipeAdvertisement


            return;
        }
    }

    public PipeAdvertisement getPipeAdvertisement(String str) {
        PipeAdvertisement pipeAdv = null;

        try {
            pipeAdv = (PipeAdvertisement) AdvertisementFactory
                    .newAdvertisement(_XML_MIME_TYPE, new ByteArrayInputStream(
                            str.getBytes()));
View Full Code Here


        } else if (qry.startsWith("<PtolemyInputPipe>")) {
            int len = qry.length();
            String pipeStr = qry.substring(18, len - 19);

            //System.out.println("the pipe information: " + pipeStr + "\n");
            PipeAdvertisement newPipeAdv = getPipeAdvertisement(pipeStr);

            for (int i = 0; i < 3; i++) {
                System.out.println("Trying to bind to pipe...");

                try {
View Full Code Here

   
    OutputPipe createPropagatedOutputPipe() {

        String instanceName = ReplicationUtil.getInstanceName();
        PipeService pipeService = this.netPeerGroup.getPipeService();
        PipeAdvertisement pipeAdv = JxtaUtil.getPropagatedPipeAdvertisement();
        if (_pipelogger.isLoggable(Level.FINEST)) {
            _pipelogger.finest("prop pipe adv: " + pipeAdv);
        }       
        OutputPipe op = null;
        try {
View Full Code Here

    }
   
    private InputPipeWrapper createPropagatedInputPipeWrapper() {
       
        PipeService pipeService = this.netPeerGroup.getPipeService();
        PipeAdvertisement pipeAdv = JxtaUtil.getPropagatedPipeAdvertisement();
        InputPipe ip = null;
        InputPipeWrapper ipWrapper = new InputPipeWrapper();
        try {
            ip = pipeService.createInputPipe(pipeAdv, ipWrapper);
            ipWrapper.setPipe(ip);
View Full Code Here

       
        boolean reshapeSuccessful = false;
        try {
            String value = System.getProperty("RDVWAIT", "false");
            this.waitForRendezvous = Boolean.valueOf(value).booleanValue();
            PipeAdvertisement pipeAdvertisement = JxtaUtil.getPipeAdvertisement(newPartnerInstance);
            if(_pipelogger.isLoggable(Level.FINE)) {
                _pipelogger.fine("pipeAdvertisement for: " + newPartnerInstance + " is: " + pipeAdvertisement +
                             " this.pipeAdv: " + this.pipeAdv);
            }
            int numPipes = this.getNumberOfPipes();
View Full Code Here

        plainSocketChannel = PlainSocketChannel.getInstance();
    }

    private void initialize() {
        try {
            PipeAdvertisement pipeAdv = JxtaUtil.getServerSocketAdv(
                    ReplicationUtil.getInstanceName() + "-OOB");
            JxtaStarter jxtaStarter = JxtaStarter.createInstance();
            PeerGroup netPeerGroup = jxtaStarter.getNetPeerGroup();
            serverSocket = new JxtaServerSocket(netPeerGroup, pipeAdv);
            serverSocket.setSoTimeout(0);
View Full Code Here

     * @return Socket connection to the destination instance.
     */
    protected Socket connect(String instanceName) {
        JxtaStarter jxtaStarter = JxtaStarter.createInstance();
        PeerGroup netPeerGroup = jxtaStarter.getNetPeerGroup();
        PipeAdvertisement pipeAdv = JxtaUtil.getServerSocketAdv(instanceName + "-OOB");
        Socket socket = null;
        PeerID peerId = null;
        try {
            peerId = JxtaUtil.getPeerID(instanceName);
        } catch (Exception ex) {
View Full Code Here

    *
    * @param  instanceName  instance name value
    * @return           The pipeAdvertisement value
    */
   public static PipeAdvertisement getPipeAdvertisement(String instanceName) {
       PipeAdvertisement advertisement = (PipeAdvertisement)
               AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
       advertisement.setPipeID(getPipeID(instanceName));
       advertisement.setName(instanceName);
       advertisement.setType(PipeService.UnicastType);
       return advertisement;
   }
View Full Code Here

       advertisement.setType(PipeService.UnicastType);
       return advertisement;
   }
  
    public static PipeAdvertisement getServerSocketAdv(String instanceName) {
        PipeAdvertisement advertisement = (PipeAdvertisement)
                AdvertisementFactory.newAdvertisement(
                        PipeAdvertisement.getAdvertisementType());
        advertisement.setPipeID(JxtaStarter.getSocketID(instanceName));
        advertisement.setName(instanceName);
        advertisement.setType(PipeService.UnicastType);
        return advertisement;
    }
View Full Code Here

    *
    * @param  instanceName  instance name value
    * @return           The pipeAdvertisement value
    */
   public static PipeAdvertisement getPropagatedPipeAdvertisement() {
       PipeAdvertisement advertisement = (PipeAdvertisement)
               AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
       advertisement.setPipeID(getSessionQueryPipeID());
       advertisement.setName(PROPAGATED);
       advertisement.setType(PipeService.PropagateType);
       return advertisement;
   }
View Full Code Here

TOP

Related Classes of net.jxta.protocol.PipeAdvertisement

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.