@Test(expected = Exception.class) public void testSendNullTransactionThrowsException() throws Exception { try { orderer = hfclient.newOrderer(ORDERER_NAME, "grpc: } catch (InvalidArgumentException e) { Assert.fail("Failed to create new orderer: " + e); } orderer.sendTransaction(null); Assert.fail("Transaction should not be null."); }
Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { ordererClient = new OrdererClient(this, new Endpoint(url, properties).getChannelBuilder(), properties); localOrdererClient = ordererClient; } try { return localOrdererClient.sendTransaction(transaction); } catch (Throwable t) { ordererClient = null; throw t; } }
Orderer implements Serializable { Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { ordererClient = new OrdererClient(this, new Endpoint(url, properties).getChannelBuilder(), properties); localOrdererClient = ordererClient; } try { return localOrdererClient.sendTransaction(transaction); } catch (Throwable t) { ordererClient = null; throw t; } } }
Orderer implements Serializable { Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { ordererClient = new OrdererClient(this, new Endpoint(url, properties).getChannelBuilder(), properties); localOrdererClient = ordererClient; } try { return localOrdererClient.sendTransaction(transaction); } catch (Throwable t) { ordererClient = null; throw t; } } Orderer(String name, String url, Properties properties); }
Orderer implements Serializable { Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { ordererClient = new OrdererClient(this, new Endpoint(url, properties).getChannelBuilder(), properties); localOrdererClient = ordererClient; } try { return localOrdererClient.sendTransaction(transaction); } catch (Throwable t) { ordererClient = null; throw t; } } Orderer(String name, String url, Properties properties); Properties getProperties(); String getName(); String getUrl(); }
Orderer implements Serializable { Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Order.sendTransaction name: %s, url: %s", name, url)); OrdererClient localOrdererClient = ordererClient; if (localOrdererClient == null || !localOrdererClient.isChannelActive()) { ordererClient = new OrdererClient(this, new Endpoint(url, properties).getChannelBuilder(), properties); localOrdererClient = ordererClient; } try { return localOrdererClient.sendTransaction(transaction); } catch (Throwable t) { ordererClient = null; throw t; } } Orderer(String name, String url, Properties properties); Properties getProperties(); String getName(); String getUrl();  }