Package org.jdesktop.wonderland.server.comms

Examples of org.jdesktop.wonderland.server.comms.CommsManager


        // in the system
        UniverseManager universe = AppContext.getManager(UniverseManager.class);
        universe.addCellListener(new CellCreationListener());

        // register the cell channel message listener
        CommsManager cm = WonderlandContext.getCommsManager();
        cm.registerClientHandler(new CellChannelConnectionHandler());
       
        // Register the cell cache message handler
        cm.registerClientHandler(new CellCacheConnectionHandler());
       
        // Register the cell hierarchy edit message handler
        cm.registerClientHandler(new CellEditConnectionHandler());
    }
View Full Code Here


public class TestProtocolPlugin implements ServerPlugin {
    private static final Logger logger =
            Logger.getLogger(TestProtocolPlugin.class.getName());
   
    public void initialize() {
        CommsManager cm = WonderlandContext.getCommsManager();
        cm.registerProtocol(new TestProtocol());
   
        // check if the protocol exists
        AppContext.getTaskManager().scheduleTask(new CheckProtocolTask());
    }
View Full Code Here

   
    public static class CheckProtocolTask implements Task, Serializable {
        public void run() throws Exception {
            logger.info("Run check protocol task");
           
            CommsManager cm = WonderlandContext.getCommsManager();
            CommunicationsProtocol cp = cm.getProtocol(TestProtocolVersion.PROTOCOL_NAME);
           
            assert cp != null;
            assert cp.getName().equals(TestProtocolVersion.PROTOCOL_NAME);
            assert cp.getVersion().equals(TestProtocolVersion.VERSION);
        }
View Full Code Here

public class ClientListenerPlugin implements ServerPlugin {
    private static final Logger logger =
            Logger.getLogger(ClientListenerPlugin.class.getName());
   
    public void initialize() {
        CommsManager cm = WonderlandContext.getCommsManager();
        cm.registerClientHandler(new TestClientHandler());
    }
View Full Code Here

public class TestListenerPlugin implements ServerPlugin {
    private static final Logger logger =
            Logger.getLogger(TestListenerPlugin.class.getName());
   
    public void initialize() {
        CommsManager cm = WonderlandContext.getCommsManager();
      
        cm.registerClientHandler(new TestClientOneHandler());
        cm.registerClientHandler(new TestClientTwoHandler());
        cm.registerClientHandler(new TestClientThreeHandler());
    }
View Full Code Here

public class PresenceManagerServerPlugin implements ServerPlugin {
    private static final Logger logger =
            Logger.getLogger(PresenceManagerServerPlugin.class.getName());
   
    public void initialize() {
        CommsManager cm = WonderlandContext.getCommsManager();
        cm.registerClientHandler(new PresenceManagerConnectionHandler());

  logger.finest("presence manager initialized");
    }
View Full Code Here

       
        return listenerMap;
    }

    private WonderlandClientSender getPresenceSender() {
        CommsManager cm = WonderlandContext.getCommsManager();
        return cm.getSender(PresenceManagerConnectionType.CONNECTION_TYPE);
    }
View Full Code Here

        // Of course, there are some obvious dangerous with this: it's not that hard
        // to fake an xmpp name to look like someone it's not. In an otherwise
        // authenticated world, this might be a way to make it look like
        // people are saying things they're not.

        CommsManager cm = WonderlandContext.getCommsManager();
        WonderlandClientSender sender = cm.getSender(TextChatConnectionType.CLIENT_TYPE);

        // Send to all clients, because the message is originating from a non-client source.
        Set<WonderlandClientID> clientIDs = sender.getClients();

        // Construct a new message with appropriate fields.
View Full Code Here

@Plugin
public class TextChatServerPlugin implements ServerPlugin {

    public void initialize() {
        // Register a handler for text chat connections
        CommsManager cm = WonderlandContext.getCommsManager();
        cm.registerClientHandler(new TextChatConnectionHandler());

        // Add a component to all avatars to enable the "Text Chat..." context
        // menu on the client
        CellManagerMO.getCellManager().registerAvatarCellComponent(TextChatAvatarComponentMO.class);   
    }
View Full Code Here

    public void setUsername(String username) {
  this.username = username;

  orbMessageHandlerRef.get().setUsername(username);

  CommsManager cm = WonderlandContext.getCommsManager();

        WonderlandClientSender sender = cm.getSender(CellChannelConnectionType.CLIENT_TYPE);

  sender.send(new OrbChangeNameMessage(cellID, username));
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.server.comms.CommsManager

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.