Examples of connect()


Examples of org.jivesoftware.whack.ExternalComponent.connect()

    try {
      // Register the new component
      componentsByDomain.put(subdomain, externalComponent);
      components.put(component, externalComponent);
      // Ask the ExternalComponent to connect with the remote server
      externalComponent.connect(host, port, SocketFactory.getDefault(), subdomain);
      // Initialize the component
      JID componentJID = new JID(null, externalComponent.getDomain(), null);
      externalComponent.initialize(componentJID, this);
    } catch (ComponentException e) {
      // Unregister the new component
View Full Code Here

Examples of org.jpos.iso.ISOChannel.connect()

        evt.addMessage ("pool-size=" + Integer.toString (pool.size()));
        for (int i=0; i<pool.size(); i++) {
            try {
                evt.addMessage ("pool-" + Integer.toString (i));
                ISOChannel c = (ISOChannel) pool.get (i);
                c.connect ();
                if (c.isConnected()) {
                    current = c;
                    usable = true;
                    break;
                }
View Full Code Here

Examples of org.jpos.iso.channel.BASE24TCPChannel.connect()

    public void testConnectThrowsNullPointerException() throws Throwable {
        BaseChannel bASE24TCPChannel = new BASE24TCPChannel();
        Socket socket = new Socket();
        bASE24TCPChannel.setTimeout(-1);
        try {
            bASE24TCPChannel.connect(socket);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
            assertNull("(BASE24TCPChannel) bASE24TCPChannel.serverIn", ((BASE24TCPChannel) bASE24TCPChannel).serverIn);
            assertNull("(BASE24TCPChannel) bASE24TCPChannel.serverOut", ((BASE24TCPChannel) bASE24TCPChannel).serverOut);
View Full Code Here

Examples of org.jpos.iso.channel.GZIPChannel.connect()

    public void testConnectThrowsNullPointerException1() throws Throwable {
        Socket socket = new Socket(Proxy.NO_PROXY);
        BaseChannel gZIPChannel = new GZIPChannel();
        gZIPChannel.setTimeout(1);
        try {
            gZIPChannel.connect(socket);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
            assertNull("(GZIPChannel) gZIPChannel.serverIn", ((GZIPChannel) gZIPChannel).serverIn);
            assertNull("(GZIPChannel) gZIPChannel.serverOut", ((GZIPChannel) gZIPChannel).serverOut);
View Full Code Here

Examples of org.jpos.iso.channel.RawChannel.connect()

        when(socketFactory.createSocket(anyString(), anyInt())).thenReturn(socket);

        BaseChannel rawChannel = new RawChannel();
        rawChannel.setSocketFactory(socketFactory);

        rawChannel.connect();
        rawChannel.disconnect();

        verify(socket).setSoLinger(true, 5);
        verify(socket).shutdownOutput();
        verify(socket).close();
View Full Code Here

Examples of org.jpos.iso.channel.XMLChannel.connect()

        ISOServer isoServer = newIsoServer();
        new Thread(isoServer).start();

        XMLChannel clientChannel = newClientChannel();

        clientChannel.connect();
        // need to push some traffic through to complete the SSL handshake
        clientChannel.send(new ISOMsg("0800"));
        assertThat(clientChannel.receive(), hasMti("0810"));

        isoServer.shutdown();
View Full Code Here

Examples of org.jtester.module.database.environment.DBEnvironment.connect()

    super.tearDown(firstTable, testResults);
  }

  public boolean connect() throws SQLException {
    DBEnvironment environment = workingEnvironment();
    environment.connect();
    return true;
  }

  public boolean connect(String type, String driver, String url, String username, String password) throws Exception {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(type, driver, url, username, password);
View Full Code Here

Examples of org.knopflerfish.service.remotefw.RemoteFramework.connect()

      try {
        Activator.myself.closeDesktop();
        if("".equals(host) || "local".equals(host)) {
          remoteBC = null;
        } else {
          remoteBC = rc.connect(host);
        }
        remoteHost = host;
      } catch (Exception e) {
        log.error("Failed to connect to " + host);
      }
View Full Code Here

Examples of org.lilyproject.util.jmx.JmxLiaison.connect()

        table.delete(delete);
        table.close();

        // Using JMX, query the size of the queue of hlogs to be processed for each replication source
        JmxLiaison jmxLiaison = new JmxLiaison();
        jmxLiaison.connect(mode == Mode.EMBED);
        ObjectName replicationSources = new ObjectName("hadoop:service=Replication,name=ReplicationSource for *");
        Set<ObjectName> mbeans = jmxLiaison.queryNames(replicationSources);
        long tryUntil = System.currentTimeMillis() + timeout;
        nextMBean: for (ObjectName mbean : mbeans) {
            int logQSize = Integer.MAX_VALUE;
View Full Code Here

Examples of org.mc4j.ems.connection.support.ConnectionProvider.connect()

            ConnectionFactory connectionFactory = new ConnectionFactory();


            ConnectionProvider connectionProvider = connectionFactory.getConnectionProvider(connectionSettings);
            this.connection = connectionProvider.connect();

            this.connection.loadSynchronous(false); // this loads all the MBeans

            this.consecutiveConnectionErrors = 0;
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.