Package com.github.ghetolay.jwamp.jetty

Examples of com.github.ghetolay.jwamp.jetty.WampJettyFactory


        connector = new ServerConnector(server);
        connector.setPort(0);
        server.addConnector(connector);

        WampJettyFactory wampFact = WampJettyFactory.getInstance();

        try (InputStream is = getClass().getResourceAsStream("/wamp-server.xml"))
        {
            WampWebSocketHandler wampHandler = wampFact.newWebsocketHandler(new Parameters(is),this);
            // wampFact.getSerializer().setDesiredFormat(WampSerializer.format.BINARY);
            server.setHandler(wampHandler);
        }
       
        // Start server
View Full Code Here


  public void connect(){
    try{
      //give time to server to start
      Thread.sleep(1000);
     
      WampJettyFactory wampFact = WampJettyFactory.getInstance();
     
      //wampFact.getSerializer().setDesiredFormat(WampSerializer.format.BINARY);
     
      wampFact.setWampParameter(new DefaultWampParameter.SimpleClientParameter(getClass().getResourceAsStream("/wamp-client.xml"), getEventListener()));
      wamp = wampFact.connect(server.getServerURI(), 1000, 1000, ReconnectPolicy.YES);
     
      waitEventResponse.start();
     
    }catch(Exception e){
      log.error("Connection Error", e);
View Full Code Here

TOP

Related Classes of com.github.ghetolay.jwamp.jetty.WampJettyFactory

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.