Package com.corundumstudio.socketio

Examples of com.corundumstudio.socketio.SocketIOClient


            packet.setSubType(PacketType.CONNECT);
            client.send(packet);

            configuration.getStoreFactory().pubSubStore().publish(PubSubStore.CONNECT, new ConnectMessage(client.getSessionId()));

            SocketIOClient nsClient = client.addNamespaceClient(ns);
            ns.onConnect(nsClient);
        }
    }
View Full Code Here


        SchedulerKey key = new SchedulerKey(Type.AUTHORIZE, client.getSessionId());
        disconnectScheduler.cancel(key);
        client.send(new Packet(PacketType.CONNECT));

        Namespace ns = namespacesHub.get(Namespace.DEFAULT_NAME);
        SocketIOClient nsClient = client.getChildClient(ns);
        namespacesHub.get(ns.getName()).onConnect(nsClient);
    }
View Full Code Here

        SchedulerKey key = new SchedulerKey(Type.AUTHORIZE, client.getSessionId());
        disconnectScheduler.cancel(key);
        client.send(new Packet(PacketType.CONNECT));

        Namespace ns = namespacesHub.get(Namespace.DEFAULT_NAME);
        SocketIOClient nsClient = client.getChildClient(ns);
        namespacesHub.get(ns.getName()).onConnect(nsClient);
    }
View Full Code Here

            disconnectable.onDisconnect(this);
        }
    }

    public SocketIOClient getChildClient(Namespace namespace) {
        SocketIOClient client = namespaceClients.get(namespace);
        if (client == null) {
            client = new NamespaceClient(this, namespace);
            SocketIOClient oldClient = namespaceClients.putIfAbsent(namespace, client);
            if (oldClient != null) {
                client = oldClient;
            }
        }
        return client;
View Full Code Here

        data.setContent(content.getContent());

        CapUserDetails userDetail = allPrincipal
            .get(data.getTargetId());
        if (userDetail != null) {
          SocketIOClient client = userDetail.getSocketClient();
          if (client != null) {
            String event = remind.getStyleTyp().equals(
                RemindEnum.TEXT.getCode()) ? "textEvent"
                : "popUpEvent";
            client.sendEvent(event, data);
            logger.debug("remind item to user : "
                + remind.getScopePid() + " " + event + " send");
          }
        }
View Full Code Here

    public SocketIOClient getChildClient(Namespace namespace) {
        return namespaceClients.get(namespace);
    }

    public SocketIOClient addChildClient(Namespace namespace) {
        SocketIOClient client = new NamespaceClient(this, namespace);
        namespaceClients.put(namespace, client);
        return client;
    }
View Full Code Here

        configuration.getStoreFactory().pubSubStore().publish(PubSubStore.CONNECT, new ConnectMessage(client.getSessionId()));

        client.send(new Packet(PacketType.CONNECT));

        Namespace ns = namespacesHub.get(Namespace.DEFAULT_NAME);
        SocketIOClient nsClient = client.addChildClient(ns);
        namespacesHub.get(ns.getName()).onConnect(nsClient);
    }
View Full Code Here

        configuration.getStoreFactory().getPubSubStore().publish(PubSubStore.CONNECT, new ConnectMessage(client.getSessionId()));

        client.send(new Packet(PacketType.CONNECT));

        Namespace ns = namespacesHub.get(Namespace.DEFAULT_NAME);
        SocketIOClient nsClient = client.getChildClient(ns);
        namespacesHub.get(ns.getName()).onConnect(nsClient);
    }
View Full Code Here

            disconnectable.onDisconnect(this);
        }
    }

    public SocketIOClient getChildClient(Namespace namespace) {
        SocketIOClient client = namespaceClients.get(namespace);
        if (client == null) {
            client = new NamespaceClient(this, namespace);
            SocketIOClient oldClient = namespaceClients.putIfAbsent(namespace, client);
            if (oldClient != null) {
                client = oldClient;
            }
        }
        return client;
View Full Code Here

            return Collections.emptyList();
        }

        List<SocketIOClient> result = new ArrayList<SocketIOClient>();
        for (UUID sessionId : sessionIds) {
            SocketIOClient client = allClients.get(sessionId);
            if(client != null) {
                result.add(client);
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of com.corundumstudio.socketio.SocketIOClient

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.