Examples of newPublishService()


Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

      sc.setMaxConnections(20); // can be set before attach, default 100 Connections
      sc.setKeepAliveIntervalSeconds(10); // can be set before attach, default 0 -> inactive
      sc.attach(); // attaching client to SC , communication starts

      String serviceName = "publish-1";
      service = sc.newPublishService(serviceName); // name of the service to use

      DemoPublishClientCallback cbk = new DemoPublishClientCallback(service); // callback on service!!
      // set up subscribe message
      SCSubscribeMessage msg = new SCSubscribeMessage();
      String mask = "0000121ABCDEFGHIJKLMNO-----------X-----------";
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

      responseMsg = sessionSrv.execute(requestMsg); // regular synchronous call
      LOGGER.info("Message sent with cacheId=" + requestMsg.getData());
      LOGGER.info("Message received from cache=" + responseMsg.getData());     
     
      SCPublishService publishService = sc.newPublishService("cacheGuardian1"); // name of the service to use

      DemoPublishClientCallback pubCbk = new DemoPublishClientCallback(publishService); // callback on service!!
      // set up subscribe message
      SCSubscribeMessage subMsg = new SCSubscribeMessage();
      String mask = "0000121ABCDEFGHIJKLMNO-----------X-----------";
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

      sc.setMaxConnections(100);

      // connects to SC, checks connection to SC
      sc.attach();

      publishServiceA = sc.newPublishService("publish-1");
      SCMessageCallback callback = new TestPublishCallback(publishServiceA);
      SCSubscribeMessage subscibeMessage = new SCSubscribeMessage();
      subscibeMessage.setMask("000012100012832102FADF-----------X-----------");
      subscibeMessage.setSessionInfo("sessionInfo");
      publishServiceA.subscribe(subscibeMessage, callback);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

  @Test
  public void t95_TwoSubscribersServerGetsDestroyed() throws Exception {
    SCClient client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC2_TCP, ConnectionType.NETTY_TCP);
    client2.attach();
    SCPublishService service1 = client.newPublishService(TestConstants.pubServiceName1);
    SCPublishService service2 = client2.newPublishService(TestConstants.pubServiceName1);

    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    subMsgRequest.setDataLength(TestConstants.pangram.length());
    @SuppressWarnings("unused")
    SCSubscribeMessage subMsgResponse = null;
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

  @Test
  public void t95_TwoSubscribersServerGetsDestroyed() throws Exception {
    SCClient client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client2.attach();
    SCPublishService service1 = client.newPublishService(TestConstants.pubServiceName1);
    SCPublishService service2 = client2.newPublishService(TestConstants.pubServiceName1);

    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    subMsgRequest.setDataLength(TestConstants.pangram.length());
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(TestConstants.mask);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

  @Test
  public void t95_TwoSubscribersServerGetsDestroyed() throws Exception {
    SCClient client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC1_TCP, ConnectionType.NETTY_TCP);
    client2.attach();
    SCPublishService service1 = client.newPublishService(TestConstants.pubServiceName1);
    SCPublishService service2 = client2.newPublishService(TestConstants.pubServiceName1);

    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    subMsgRequest.setDataLength(TestConstants.pangram.length());
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(TestConstants.mask);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

      SCSubscribeMessage subscibeMessage = new SCSubscribeMessage();
      subscibeMessage.setMask(TestConstants.mask);
      subscibeMessage.setSessionInfo("sessionInfo");

      if (getMethodName() == "subscribe_serviceNameValidMaskSameAsInServer_isSubscribedSessionIdExists") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();

      } else if (getMethodName() == "subscribe_timeoutMaxAllowed_isSubscribedSessionIdExists") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();

      } else if (getMethodName() == "subscribe_timeoutMaxAllowed_isSubscribedSessionIdExists") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(3600, subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();

      } else if (getMethodName() == "changeSubscription_toMaskWhiteSpace_passes") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(3600, subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();

      } else if (getMethodName() == "changeSubscription_toMaskWhiteSpace_passes") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        subscibeMessage.setMask(" ");
        service.changeSubscription(subscibeMessage);
        service.unsubscribe();
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newPublishService()

        subscibeMessage.setMask(" ");
        service.changeSubscription(subscibeMessage);
        service.unsubscribe();

      } else if (getMethodName() == "subscribeUnsubscribe_twice_isSubscribedThenNot") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        service.unsubscribe();
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.