Package org.red5.server.messaging

Examples of org.red5.server.messaging.ServiceAdapter.manage()


            //this will be the body of the responding command message
            AsyncMessageExt ext = new AsyncMessageExt();
            ext.setClientId(clientId);
            ext.setCorrelationId(msg.getMessageId());
            ext.setDestination("Red5Chat");
            ext.setBody(adapter.manage(msg));
            /*
            //grab any headers
            Map<String, Object> headers = msg.getHeaders();
            log.debug("Headers: {}", headers);
            if (headers.containsKey(Message.FLEX_CLIENT_ID_HEADER)) {
View Full Code Here


            //this will be the body of the responding command message
            AsyncMessageExt ext = new AsyncMessageExt();
            ext.setClientId(clientId);
            ext.setCorrelationId(msg.getMessageId());
            ext.setDestination("Red5Chat");
            ext.setBody(adapter.manage(msg));
            //add as a child (body) of the command message
            result.setBody(new Object[]{ext});   
           
            return result;
          } else {
View Full Code Here

            if (endpoints.containsKey(destination)) {
              Object endpoint = endpoints.get(destination);
            //if the endpoint is an adapter, try to subscribe
              if (endpoint instanceof ServiceAdapter) {
                ServiceAdapter adapter = (ServiceAdapter) endpoint;
                boolean subscribed = ((Boolean) adapter.manage(msg));
                if (subscribed) {
                  log.debug("Client was subscribed");
                  registerClientToAdapter(clientId, adapter);
                } else {
                  log.debug("Client was not subscribed");
View Full Code Here

      case Constants.UNSUBSCRIBE_OPERATION: //1
        log.trace("Unsubscribe: {}", clientId);
        if (registrations.containsKey(clientId)) {
          ServiceAdapter adapter = registrations.get(clientId);
          boolean unsubscribed = ((Boolean) adapter.manage(msg));
          if (unsubscribed) {
            log.debug("Client was unsubscribed");
            unregisterClientFromAdapter(clientId);
          } else {
            log.debug("Client was not unsubscribed");
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.