Package org.apache.activemq.transport.mock

Examples of org.apache.activemq.transport.mock.MockTransport


            });
            connection.start();
        }

        public void failConnection() {
            MockTransport mockTransport = connection.getTransportChannel().narrow(MockTransport.class);
            mockTransport.onException(new IOException("Simulated error"));
        }
View Full Code Here


        sendMessage(connection2);
    }

    private void createConnectionFailure(Connection connection) throws Exception {
        ActiveMQConnection c = ((PooledConnection)connection).getConnection();
        MockTransport t = (MockTransport)c.getTransportChannel().narrow(MockTransport.class);
        t.onException(new IOException("forcing exception for " + getName() + " to force pool eviction"));
        LOG.info("arranged for failure, chucked exception");
    }
View Full Code Here

            });
            connection.start();
        }

        public void failConnection() {
            MockTransport mockTransport = connection.getTransportChannel().narrow(MockTransport.class);
            mockTransport.onException(new IOException("Simulated error"));
        }
View Full Code Here

       
        final CountDownLatch publishDone = new CountDownLatch(1);
       
        // The MockTransport is on the remote connection.
        // Slip in a new transport filter after the MockTransport
        MockTransport mt = (MockTransport) connection3.getTransport().narrow(MockTransport.class);
        mt.install(new TransportFilter(mt.getNext()) {
            public void oneway(Object command) throws IOException {
                log.info("Dropping: "+command);
                // just eat it! to simulate a recent failure.
            }
        });
View Full Code Here

        }});
      connection.start();
    }
   
      public void failConnection() {
      MockTransport mockTransport = (MockTransport)connection.getTransportChannel().narrow(MockTransport.class);
        mockTransport.onException(new IOException("Simulated error"));
      }
View Full Code Here

    sendMessage(connection2);   
  }
 
  private void createConnectionFailure(Connection connection) throws Exception {
    ActiveMQConnection c = ((PooledConnection)connection).getConnection();
    MockTransport t = (MockTransport) c.getTransportChannel().narrow(MockTransport.class);
    t.stop();
  }
View Full Code Here

        sendMessage(connection2);
    }

    private void createConnectionFailure(Connection connection) throws Exception {
        ActiveMQConnection c = ((PooledConnection)connection).getConnection();
        MockTransport t = (MockTransport)c.getTransportChannel().narrow(MockTransport.class);
        t.onException(new IOException("forcing exception for " + getName() + " to force pool eviction"));
        LOG.info("arranged for failure, chucked exception");
    }
View Full Code Here

        sendMessage(connection2);
    }

    private void createConnectionFailure(Connection connection) throws Exception {
        ActiveMQConnection c = (ActiveMQConnection) ((PooledConnection)connection).getConnection();
        MockTransport t = (MockTransport)c.getTransportChannel().narrow(MockTransport.class);
        t.onException(new IOException("forcing exception for " + getName() + " to force pool eviction"));
        LOG.info("arranged for failure, chucked exception");
    }
View Full Code Here

            });
            connection.start();
        }

        public void failConnection() {
            MockTransport mockTransport = connection.getTransportChannel().narrow(MockTransport.class);
            mockTransport.onException(new IOException("Simulated error"));
        }
View Full Code Here

        final CountDownLatch publishDone = new CountDownLatch(1);

        // The MockTransport is on the remote connection.
        // Slip in a new transport filter after the MockTransport
        MockTransport mt = (MockTransport)connection3.getTransport().narrow(MockTransport.class);
        mt.install(new TransportFilter(mt.getNext()) {
            public void oneway(Object command) throws IOException {
                LOG.info("Dropping: " + command);
                // just eat it! to simulate a recent failure.
            }
        });
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.mock.MockTransport

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.