本文整理匯總了Java中org.red5.server.api.IClientRegistry類的典型用法代碼示例。如果您正苦於以下問題:Java IClientRegistry類的具體用法?Java IClientRegistry怎麽用?Java IClientRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IClientRegistry類屬於org.red5.server.api包,在下文中一共展示了IClientRegistry類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: connectionHandler
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
@Test
public void connectionHandler() {
context = (Context) applicationContext.getBean("web.context");
TestConnection conn = new TestConnection(host, "/", null);
// add the connection to thread local
Red5.setConnectionLocal(conn);
// resolve root
IScope scope = context.resolveScope("/");
IClientRegistry reg = context.getClientRegistry();
IClient client = reg.newClient(null);
assertNotNull(client);
log.debug("----------------------------------\nDump scope details");
((Scope) scope).dump();
log.debug("----------------------------------\n");
conn.initialize(client);
if (!conn.connect(scope)) {
assertTrue("didnt connect", false);
} else {
assertTrue("should have a scope", conn.getScope() != null);
conn.close();
assertTrue("should not be connected", !conn.isConnected());
}
Red5.setConnectionLocal(null);
}
示例2: createConnection
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
private IConnection createConnection(int id) {
//create our sender conn and set local
IClientRegistry dummyReg = (IClientRegistry) applicationContext.getBean("global.clientRegistry");
IScope scp = (WebScope) applicationContext.getBean("web.scope");
//IContext ctx = (Context) applicationContext.getBean("web.context");
IConnection conn = new SvcCapableTestConnection("localhost", "/junit", id + "");//host, path, session id
IClient rClient = dummyReg.newClient(new Object[] { "client-" + id });
((TestConnection) conn).setClient(rClient);
((TestConnection) conn).setScope((Scope) scp);
((DummyClient) rClient).registerConnection(conn);
return conn;
}
示例3: handler
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
@Test
public void handler() {
context = (Context) applicationContext.getBean("web.context");
Scope testApp = (Scope) context.resolveScope(appPath);
assertTrue("should have a handler", testApp.hasHandler());
IClientRegistry reg = context.getClientRegistry();
IClient client = reg.newClient(null);
TestConnection conn = new TestConnection(host, appPath, client.getId());
conn.initialize(client);
Red5.setConnectionLocal(conn);
assertTrue("client should not be null", client != null);
log.debug("{}", client);
String key = "key";
String value = "value";
client.setAttribute(key, value);
assertTrue("attributes not working", client.getAttribute(key) == value);
assertTrue(conn.connect(testApp));
assertTrue("app should have 1 client", testApp.getClients().size() == 1);
assertTrue("host should have 1 client", testApp.getParent().getClients().size() == 1);
conn.close();
assertTrue("app should have 0 client", testApp.getClients().size() == 0);
assertTrue("host should have 0 client", testApp.getParent().getClients().size() == 0);
//client.disconnect();
Red5.setConnectionLocal(null);
}
示例4: setClientRegistry
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
/**
* Setter for client registry
*
* @param clientRegistry
* Client registry
*/
public void setClientRegistry(IClientRegistry clientRegistry) {
this.clientRegistry = clientRegistry;
}
示例5: getClientRegistry
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
/**
* Return client registry
*
* @return Client registry
*/
public IClientRegistry getClientRegistry() {
return clientRegistry;
}
示例6: setClientRegistry
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
/**
* Setter for client registry
*
* @param clientRegistry Client registry
*/
public void setClientRegistry(IClientRegistry clientRegistry) {
this.clientRegistry = clientRegistry;
}
示例7: getClientRegistry
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
/**
* Return client registry
*
* @return Client registry
*/
public IClientRegistry getClientRegistry() {
return clientRegistry;
}
示例8: getClientRegistry
import org.red5.server.api.IClientRegistry; //導入依賴的package包/類
public IClientRegistry getClientRegistry();