Package com.sun.sgs.app

Examples of com.sun.sgs.app.Channel.leave()


    @Test
    public void testChannelLeaveNoTxn() throws Exception {
  Channel channel = createChannel();
  DummyClient client = newClient();
  try {
      channel.leave(client.getSession());
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
      System.err.println(e);
  } finally {
      if (client != null) {
View Full Code Here


  final DummyClient client = newClient();
  try {
      txnScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() throws Exception {
        try {
      channel.leave(client.getSession());
      fail("Expected TransactionNotActiveException");
        } catch (TransactionNotActiveException e) {
      System.err.println(e);
        }
    }
View Full Code Here

        ClientSession session =
      (ClientSession) dataService.getBinding(user);
        channel.join(session);
        dataService.removeObject(channel);
        try {
      channel.leave(session);
      fail("Expected IllegalStateException");
        } catch (IllegalStateException e) {
      System.err.println(e);
        }
    }
View Full Code Here

  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() {
    Channel channel =
        channelService.createChannel("x", null, Delivery.RELIABLE);
    try {
        channel.leave((ClientSession) null);
        fail("Expected NullPointerException");
    } catch (NullPointerException e) {
        System.err.println(e);
    }
      }
View Full Code Here

        channel.join(moe);

        try {
      ClientSession larry =
          (ClientSession) dataService.getBinding(LARRY);
      channel.leave(larry);
      System.err.println("leave of non-member session returned");
     
        } catch (Exception e) {
      System.err.println(e);
      fail("test failed with exception: " + e);
View Full Code Here

   
    txnScheduler.runTask(new TestAbstractKernelRunnable() {
        public void run() {
      Channel channel = getChannel(channelName);
      ClientSession session = getSession(user);
      channel.leave(session);
        }}, taskOwner);

    Thread.sleep(100);
   
    txnScheduler.runTask(new TestAbstractKernelRunnable() {
View Full Code Here

    @Test
    public void testChannelLeaveNoTxn() throws Exception {
  Channel channel = createChannel();
  DummyClient client = newClient();
  try {
      channel.leave(client.getSession());
      fail("Expected TransactionNotActiveException");
  } catch (TransactionNotActiveException e) {
      System.err.println(e);
  } finally {
      if (client != null) {
View Full Code Here

  final DummyClient client = newClient();
  try {
      txnScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() throws Exception {
        try {
      channel.leave(client.getSession());
      fail("Expected TransactionNotActiveException");
        } catch (TransactionNotActiveException e) {
      System.err.println(e);
        }
    }
View Full Code Here

        ClientSession session =
      (ClientSession) dataService.getBinding(user);
        channel.join(session);
        dataService.removeObject(channel);
        try {
      channel.leave(session);
      fail("Expected IllegalStateException");
        } catch (IllegalStateException e) {
      System.err.println(e);
        }
    }
View Full Code Here

  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() {
    Channel channel =
        channelService.createChannel("x", null, Delivery.RELIABLE);
    try {
        channel.leave((ClientSession) null);
        fail("Expected NullPointerException");
    } catch (NullPointerException e) {
        System.err.println(e);
    }
      }
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.