Examples of Connection

  • 2 ends that can be connected to {@link Gate}.
  • A {@link Path} that provides the path from the first end to the last end @author zxpletran007
  • spark.api.Connection
    A connection to a SPARQL processor. Connections can be used to create commands, get metadata, or be closed.
  • sun.rmi.transport.Connection
  • tv.floe.metronome.classification.neuralnetworks.core.Connection
  • vicazh.hyperpool.stream.Connection
    This class is the superclass of all connections @author Victor Zhigunov @version 0.4.8.3

  • Examples of ie.omk.smpp.Connection

        injectResource(buildConnectorContext("test"), connector);
        connector.configure();
        connector.doStart();

        // open connection and bind
        Connection connection = connect(4444);
        bind(connection, Connection.TRANSMITTER, "test", "test", null);

        SubmitSM submitSM = (SubmitSM) connection.newInstance(SMPPPacket.SUBMIT_SM);
        submitSM.setDestination(new Address(0, 0, "573001111111"));
        submitSM.setSource(new Address(0, 0, "3542"));
        submitSM.setMessageText("This is a test");

        SubmitSMResp response = (SubmitSMResp) connection.sendRequest(submitSM);
        Assert.assertNotNull(response);
        Assert.assertTrue(response.getMessageId() != null);

        Assert.assertEquals(messageProducer.messageCount(), 1);
        Message message = messageProducer.getMessage(0);
        Assert.assertNotNull(message);
        Assert.assertEquals(message.getProperty("to", String.class), "573001111111");
        Assert.assertEquals(message.getProperty("from", String.class), "3542");
        Assert.assertEquals(message.getProperty("text", String.class), "This is a test");

        connection.unbind();
        connection.closeLink();

        connector.doStop();
      }
    View Full Code Here

    Examples of jade.imtp.leap.JICP.Connection

              throw new ICPException("Upsetting dispatching order");
            }
            waitingForFlush = false;
     
            // Wait for the connection to deliver outgoing commands to be ready
            Connection c = getOutgoingCommandsConnection();
     
            // Send the command to the front-end
            JICPPacket cmd = new JICPPacket(JICPProtocol.COMMAND_TYPE, JICPProtocol.DEFAULT_INFO, payload);
            int sid = nextOutgoingCommandSid;
            nextOutgoingCommandSid = increment(nextOutgoingCommandSid);
            if (myLogger.isLoggable(Logger.FINE)) {
              myLogger.log(Logger.FINE, myID+" - Delivering outgoing command to front-end. SID = " + sid);
            }
            cmd.setSessionID((byte) sid);
            boolean deliverOK = false;
            try {
              c.writePacket(cmd);
              close(c);
              // Wait for the response
              JICPPacket response = getResponse(RESPONSE_TIMEOUT + RESPONSE_TIMEOUT_INCREMENT * (cmd.getLength() / 1024));
              deliverOK = true;
              if (myLogger.isLoggable(Logger.FINE)) {
    View Full Code Here

    Examples of java.sql.Connection

                    userName = pc.getUserName();
                    xacon = getXADataSource().
                        getXAConnection(userName,
                                        new String(pc.getPassword()));
                }
                Connection con = xacon.getConnection();
                return new CciManagedConnection
                    (this, pc, xacon, con, true, true);
            } catch (SQLException ex) {
                ResourceException re =
                    new EISSystemException("SQLException: " + ex.getMessage());
    View Full Code Here

    Examples of javax.jms.Connection

        Integer orderId = (Integer) servletContext.getAttribute(ORDER_ID_ATTR);
        Float linePrice = (Float) servletContext.getAttribute(LINE_PRICE_ATTR);
        float amount = linePrice + shippingPrice;

        // create a connection
        Connection connection = connectionFactory.createConnection();
        try {
          // create a session
          Session session =
              connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
          try {
            // create the message
            MapMessage invoiceMessage = session.createMapMessage();
            invoiceMessage.setInt("orderId", orderId);
            invoiceMessage.setFloat("amount", amount);

            // send it!
            MessageProducer producer = session.createProducer(invoiceQueue);
            producer.send(invoiceMessage);

            logger.log(
                Level.FINE,
                "sent invoice message for PO #{0,number,integer} with amount {1,number,currency}",
                new Object[] { orderId, amount });
          }
          finally {
            session.close();
          }
        }
        finally {
          connection.close();
        }
      }
    View Full Code Here

    Examples of javax.microedition.io.Connection

        } else {
          connection.setDoInput(mode == ConnectorService.READ);
          connection.setDoOutput(mode == ConnectorService.WRITE);
        }
       
        Connection con = new HttpConnectionAdapter(this, connection);
        return con;
      }
    View Full Code Here

    Examples of javax.resource.cci.Connection

        public void testProxy() throws Exception {
            Object proxy = kernel.invoke(managedConnectionFactoryName, "$getResource");
            assertNotNull(proxy);
            assertTrue(proxy instanceof ConnectionFactory);
            Connection connection = ((ConnectionFactory) proxy).getConnection();
            assertNotNull(connection);
            kernel.stopGBean(managedConnectionFactoryName);
            try {
                ((ConnectionFactory) proxy).getConnection();
    //            fail();
    View Full Code Here

    Examples of javax.xml.registry.Connection

            return cs;
        }

        protected Connection loginSecondUser()
        {
            Connection con = null;
            try
            {
                if (factory == null)
                    throw new IllegalStateException("ConnectionFactory is null");
                con = factory.createConnection();
            } catch (JAXRException e)
            {
                e.printStackTrace();
            }
            PasswordAuthentication passwdAuth = new PasswordAuthentication("jbosscts",
                    passwd.toCharArray());
            Set creds = new HashSet();
            creds.add(passwdAuth);

            try
            {
                con.setCredentials(creds);
            } catch (JAXRException e)
            {
                e.printStackTrace();
                fail(e.getMessage());
            }
    View Full Code Here

    Examples of jcgp.backend.population.Connection

          @Override
          public void handle(MouseDragEvent event) {
            // the drag has entered this node, react appropriately
            // this happens even if we are the source of the drag
            ((GUIGene) event.getGestureSource()).setConnectionLine((GUIGene) event.getSource());
            Connection source = ((GUIGene) event.getGestureSource()).getChangingConnection();
            if (input == source) {
              setState(GUIGeneState.NO_CHANGE_TARGET);
            } else {
              setState(GUIGeneState.VALID_TARGET);
            }
          }
        });

        addEventFilter(MouseDragEvent.MOUSE_DRAG_EXITED, new EventHandler<MouseDragEvent>() {
          @Override
          public void handle(MouseDragEvent event) {
            // the drag has exited this node, react appropriately
            // this happens even if we are the source of the drag
            parent.setTarget(false);
            if (event.isPrimaryButtonDown()) {
              if (getState() == GUIGeneState.NO_CHANGE_TARGET) {
                setState(GUIGeneState.INDIRECT_HOVER);
              } else {
                setState(GUIGeneState.NEUTRAL);
                ((GUIGene) event.getGestureSource()).setConnectionStates(GUIGeneState.INDIRECT_HOVER);
              }
            }
          }

        });

        addEventFilter(MouseDragEvent.MOUSE_DRAG_RELEASED, new EventHandler<MouseDragEvent>() {
          @Override
          public void handle(MouseDragEvent event) {
            GUIGene source = ((GUIGene) event.getGestureSource());
            // set states to reflect the new situation
            if (source.isLocked()) {
              source.setState(GUIGeneState.HOVER);
              source.setConnectionStates(GUIGeneState.HOVER);
            } else {
              source.setState(GUIGeneState.NEUTRAL);
              source.setConnectionStates(GUIGeneState.NEUTRAL);
            }
           
            // the user released the drag gesture on this node, react appropriately
            if (source.isLocked()) {
              // remove locks from the old connection, add the to the new
              // note that the old connection may still have locks after this
              parent.getGuiGene(source.getChangingConnection()).removeLocks(source.getLocks());
              source.setChangingConnection(input);
              addLocks(source.getLocks());
            } else {
              source.setChangingConnection(input);
            }

            source.updateLines();
            setState(GUIGeneState.HOVER);     
          }
        });
       
        addEventFilter(MouseEvent.MOUSE_ENTERED, new EventHandler<MouseEvent>() {
    View Full Code Here

    Examples of jnipap.Connection

      public void createConnection() {

        URL url;
        try {
          url = new URL("http://127.0.0.1:1337/RPC2");
          this.connection = new Connection(url, "dev", "dev");
          this.connection.authoritative_source = "test";
        } catch (Exception e) {
          fail("Operation resulted in " + e.getClass().getName() + " with message \"" + e.getMessage() + "\"");
        }
    View Full Code Here

    Examples of mage.remote.Connection

                this.username = username;
            }

            public void connect() {
                session = new SessionImpl(this);
                Connection connection = new Connection();
                connection.setUsername(username);
                connection.setHost("localhost");
                connection.setPort(17171);
                connection.setProxyType(Connection.ProxyType.NONE);

                session.connect(connection);
            }
    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.