Package org.red5.server.api.scope

Examples of org.red5.server.api.scope.IScope.connect()


    IScope scope = context.resolveScope("/");
    IClientRegistry reg = context.getClientRegistry();
    IClient client = reg.newClient(null);
    assertNotNull(client);
    conn.initialize(client);
    if (conn.connect(scope)) {
      assertTrue("should have a scope", conn.getScope() != null);
      conn.close();
      assertTrue("should not be connected", !conn.isConnected());
    } else {
      assertTrue("didnt connect", false);
View Full Code Here


    client.setAttribute(key, value);
    assertTrue("attributes not working", client.getAttribute(key) == value);

    conn.initialize(client);

    if (conn.connect(testApp)) {
      // give connect a moment to settle
      Thread.sleep(100L);
      assertTrue("Should have a scope", conn.getScope() != null);
      assertTrue("app should have 1 client", ((Scope) testApp).getActiveClients() == 1);
      assertTrue("host should have 1 client", testApp.getParent().getClients().size() == 1);
View Full Code Here

    IClientRegistry reg = context.getClientRegistry();
    IClient client = reg.newClient(null);
    TestConnection conn = new TestConnection(host, appPath, client.getId());
    conn.initialize(client);
    Red5.setConnectionLocal(conn);
    assertTrue(conn.connect(room5));
    // their code
    IScope scope = Red5.getConnectionLocal().getScope();
    for (IConnection tempConn : scope.getClientConnections()) {
      if (tempConn instanceof IServiceCapableConnection) {
        try {
View Full Code Here

    Thread r = new Thread(new Runnable() {
      public void run() {
        Red5.setConnectionLocal(recipient);
        IConnection conn = Red5.getConnectionLocal();
        assertTrue(scp.connect(conn));
        try {
          Thread.sleep(120L);
        } catch (InterruptedException e) {
        }
        log.debug("Check s/c -\n s1: {} s2: {}\n c1: {} c2: {}", new Object[] { scp, conn.getScope(), ctx, conn.getScope().getContext() });
View Full Code Here

    });
    Thread s = new Thread(new Runnable() {
      public void run() {
        Red5.setConnectionLocal(sender);
        IConnection conn = Red5.getConnectionLocal();
        assertTrue(scp.connect(conn));
        try {
          Thread.sleep(10L);
        } catch (InterruptedException e) {
        }
        Object[] sendobj = new Object[] { conn.getClient().getId(), message };
View Full Code Here

  }
 
  protected void sendConnectMessage(RTMPConnection conn) {
    IMRTMPConnection mrtmpConn = mrtmpManager.lookupMRTMPConnection(conn);
    if (mrtmpConn != null) {
      mrtmpConn.connect(conn.getId());
    }
  }
 
  protected void forwardPacket(RTMPConnection conn, Packet packet) {
    IMRTMPConnection mrtmpConn = mrtmpManager.lookupMRTMPConnection(conn);
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.