[Red5commits] [936] many javadoc updatesadded helper method for IClient to get all connections to a
jbauch
luke at codegent.com
Tue Jun 20 04:16:28 EDT 2006
many javadoc updates
added helper method for IClient to get all connections to a given scope
Timestamp: 06/11/06 09:53:33 (1 week ago)
Change: 936
Author: jbauch
Files (see diff or trac for details):
java/server/trunk/src/org/red5/server/Client.java
java/server/trunk/src/org/red5/server/api/IAttributeStore.java
java/server/trunk/src/org/red5/server/api/IBasicScope.java
java/server/trunk/src/org/red5/server/api/IClient.java
java/server/trunk/src/org/red5/server/api/IConnection.java
java/server/trunk/src/org/red5/server/api/IContext.java
java/server/trunk/src/org/red5/server/api/ICoreObject.java
java/server/trunk/src/org/red5/server/api/IGlobalScope.java
java/server/trunk/src/org/red5/server/api/IMappingStrategy.java
java/server/trunk/src/org/red5/server/api/IScope.java
java/server/trunk/src/org/red5/server/api/IScopeAware.java
java/server/trunk/src/org/red5/server/api/IScopeHandler.java
java/server/trunk/src/org/red5/server/api/IScopeResolver.java
java/server/trunk/src/org/red5/server/api/IServer.java
java/server/trunk/src/org/red5/server/api/Red5.java
java/server/trunk/src/org/red5/server/api/ScopeUtils.java
java/server/trunk/src/org/red5/server/service/HandlerServiceResolver.java
Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/936
Index: /java/server/trunk/src/org/red5/server/Client.java
===================================================================
--- /java/server/trunk/src/org/red5/server/Client.java (revision 866)
+++ /java/server/trunk/src/org/red5/server/Client.java (revision 936)
@@ -3,5 +3,7 @@
import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map.Entry;
import java.util.Set;
@@ -50,4 +52,16 @@
return connToScope.keySet();
}
+
+ public Set<IConnection> getConnections(IScope scope) {
+ if (scope == null)
+ return getConnections();
+
+ Set<IConnection> result = new HashSet<IConnection>();
+ for (Entry<IConnection, IScope> entry: connToScope.entrySet()) {
+ if (scope.equals(entry.getValue()))
+ result.add(entry.getKey());
+ }
+ return result;
+ }
public Collection<IScope> getScopes() {
Index: /java/server/trunk/src/org/red5/server/service/HandlerServiceResolver.java
===================================================================
--- /java/server/trunk/src/org/red5/server/service/HandlerServiceResolver.java (revision 934)
+++ /java/server/trunk/src/org/red5/server/service/HandlerServiceResolver.java (revision 936)
@@ -29,5 +29,5 @@
* @author The Red5 Project (red5 at osflash.org)
* @author Joachim Bauch (jojo at struktur.de)
- * @see org.red5.server.api.service.IServiceHandlerProvider#registerServiceHandler(String, Object)
+ * @see org.red5.server.api.service.IServiceHandlerProvider#registerServiceHandler(IScope, String, Object)
*
*/
Index: /java/server/trunk/src/org/red5/server/api/Red5.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/Red5.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/Red5.java (revision 936)
@@ -1,4 +1,3 @@
package org.red5.server.api;
-
/*
@@ -22,7 +21,7 @@
/**
- * Utility class for accessing red5 API objects.
+ * Utility class for accessing Red5 API objects.
*
- * This class uses a thread local, and will be setup by the service invoker
+ * This class uses a thread local, and will be setup by the service invoker.
*
* The code below shows various uses.
Index: /java/server/trunk/src/org/red5/server/api/IScopeAware.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IScopeAware.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IScopeAware.java (revision 936)
@@ -1,6 +1,38 @@
package org.red5.server.api;
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * Maker interface for all objects that are aware of the scope they are located in.
+ *
+ * @author The Red5 Project (red5 at osflash.org)
+ * @author Luke Hubbard (luke at codegent.com)
+ *
+ */
public interface IScopeAware {
+ /**
+ * Set the scope the object is located in.
+ *
+ * @param scope
+ * scope for this object
+ */
public void setScope(IScope scope);
Index: /java/server/trunk/src/org/red5/server/api/IGlobalScope.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IGlobalScope.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IGlobalScope.java (revision 936)
@@ -1,6 +1,36 @@
package org.red5.server.api;
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * The global scope that acts as root for all applications in a host.
+ *
+ * @author The Red5 Project (red5 at osflash.org)
+ * @author Luke Hubbard (luke at codegent.com)
+ *
+ */
public interface IGlobalScope extends IScope {
+ /**
+ * Register the global scope in the server and initialize it.
+ *
+ */
public void register();
Index: /java/server/trunk/src/org/red5/server/api/IScopeResolver.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IScopeResolver.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IScopeResolver.java (revision 936)
@@ -1,3 +1,22 @@
package org.red5.server.api;
+
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
/**
@@ -6,5 +25,19 @@
public interface IScopeResolver {
+ /**
+ * Return the global scope.
+ *
+ * @return global scope
+ */
public IGlobalScope getGlobalScope();
+
+ /**
+ * Get the scope for a given path.
+ *
+ * @param path
+ * path to return the scope for
+ * @return scope for passed path
+ * @throws ScopeNotFoundException if scope doesn't exist an can't be created
+ */
public IScope resolveScope(String path);
Index: /java/server/trunk/src/org/red5/server/api/IConnection.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IConnection.java (revision 918)
+++ /java/server/trunk/src/org/red5/server/api/IConnection.java (revision 936)
@@ -1,5 +1,3 @@
package org.red5.server.api;
-
-import java.util.Iterator;
/*
@@ -22,4 +20,6 @@
*/
+import java.util.Iterator;
+
/**
* The connection object.
@@ -38,20 +38,20 @@
/**
- * Persistent connection type, eg RTMP
+ * Persistent connection type, eg RTMP.
*/
public static final String PERSISTENT = "persistent";
/**
- * Polling connection type, eg RTMPT
+ * Polling connection type, eg RTMPT.
*/
public static final String POLLING = "polling";
/**
- * Transient connection type, eg Remoting, HTTP, etc
+ * Transient connection type, eg Remoting, HTTP, etc.
*/
public static final String TRANSIENT = "transient";
/**
- * Get the connection type
+ * Get the connection type.
*
* @return string containing one of connection types
@@ -60,10 +60,10 @@
/**
- * Initialize the connection
+ * Initialize the connection.
*/
public void initialize(IClient client);
/**
- * Try to connect to the scope
+ * Try to connect to the scope.
*/
public boolean connect(IScope scope);
@@ -75,18 +75,18 @@
/**
- * Is the client connected to the scope
+ * Is the client connected to the scope.
*
- * @return true if the connection is persistent or polling, otherwise false
+ * @return <code>true</code> if the connection is persistent or polling, otherwise <code>false</code>
*/
public boolean isConnected();
/**
- * Close this connection, this will disconnect the client from the
- * associated scope
+ * Close this connection. This will disconnect the client from the
+ * associated scope.
*/
public void close();
/**
- * Get the client object associated with this connection
+ * Get the client object associated with this connection.
*
* @return client object
@@ -95,5 +95,5 @@
/**
- * Get the hostname that the client is connected to. If they connected to an
+ * Get the hostname that the client is connected to. If they are connected to an
* IP, the IP address will be returned as a String.
*
@@ -110,6 +110,6 @@
/**
- * Get the path for this connection
- * This is not updated if you switch scope
+ * Get the path for this connection.
+ * This is not updated if you switch scope.
*
* @return path
@@ -118,5 +118,5 @@
/**
- * Get the session id, this may be null
+ * Get the session id, this may be <code>null</code>.
*
* @return session id
@@ -171,6 +171,12 @@
public int getLastPingTime();
+ /**
+ * Get the scope this is connected to.
+ *
+ * @return the connected scope
+ */
public IScope getScope();
+ // XXX: is this used somewhere?
public Iterator<IBasicScope> getBasicScopes();
Index: /java/server/trunk/src/org/red5/server/api/IServer.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IServer.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IServer.java (revision 936)
@@ -1,18 +1,108 @@
package org.red5.server.api;
+
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
import java.util.Iterator;
import java.util.Map;
+/**
+ * The interface that represents the Red5 server.
+ *
+ * @author The Red5 Project (red5 at osflash.org)
+ * @author Luke Hubbard (luke at codegent.com)
+ *
+ */
public interface IServer {
public static final String ID = "red5.server";
+ /**
+ * Get the global scope with a given name.
+ *
+ * @param name
+ * name of the global scope
+ * @return the global scope
+ */
public IGlobalScope getGlobal(String name);
+
+ /**
+ * Register a global scope.
+ *
+ * @param scope
+ * the global scope to register
+ */
public void registerGlobal(IGlobalScope scope);
+
+ /**
+ * Lookup the global scope for a host.
+ *
+ * @param hostName
+ * the name of the host
+ * @param contextPath
+ * the path in the host
+ * @return the found global scope or <code>null</code>
+ */
public IGlobalScope lookupGlobal(String hostName, String contextPath);
+
+ /**
+ * Map a virtual hostname and a path to the name of a global scope.
+ *
+ * @param hostName
+ * the name of the host to map
+ * @param contextPath
+ * the path to map
+ * @param globalName
+ * the name of the global scope to map to
+ * @return <code>true</code> if the name was mapped, otherwise <code>false</code>
+ */
public boolean addMapping(String hostName, String contextPath, String globalName);
+
+ /**
+ * Unregister a previously mapped global scope.
+ *
+ * @param hostName
+ * the name of the host to unmap
+ * @param contextPath
+ * the path for this host to unmap
+ * @return <code>true</code> if the global scope was unmapped, otherwise <code>false</code>
+ */
public boolean removeMapping(String hostName, String contextPath);
- public Map<String,String> getMappingTable();
+
+ /**
+ * Query informations about the global scope mappings.
+ *
+ * @return a map containing informations about the mappings
+ */
+ public Map<String,String> getMappingTable();
+
+ /**
+ * Get list of global scope names.
+ *
+ * @return names of global scopes
+ */
public Iterator<String> getGlobalNames();
+
+ /**
+ * Get list of global scopes.
+ *
+ * @return list of global scopes
+ */
public Iterator<IGlobalScope> getGlobalScopes();
Index: /java/server/trunk/src/org/red5/server/api/IScopeHandler.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IScopeHandler.java (revision 762)
+++ /java/server/trunk/src/org/red5/server/api/IScopeHandler.java (revision 936)
@@ -24,5 +24,5 @@
/**
- * The Scope Handler controls actions performed against a scope object, and also
+ * The scope handler controls actions performed against a scope object, and also
* is notified of all events.
*
@@ -41,66 +41,74 @@
/**
- * Called when a scope is created for the first time
+ * Called when a scope is created for the first time.
*
* @param scope
- * the new scope object
+ * the new scope object
+ * @return <code>true</code> to allow, <code>false</code> to deny
*/
boolean start(IScope scope);
/**
- * Called just before a scope is disposed
+ * Called just before a scope is disposed.
*/
void stop(IScope scope);
/**
- * Called just before every connection to a scope
+ * Called just before every connection to a scope.
*
* @param conn
- * connection object
- */
- /*boolean connect(IConnection conn, IScope scope);*/
-
- /**
- * Called just before every connection to a scope
- *
- * @param conn
- * connection object
+ * connection object
+ * @return <code>true</code> to allow, <code>false</code> to deny
*/
boolean connect(IConnection conn, IScope scope, Object[] params);
/**
- * Called just after the a connection is disconnected
+ * Called just after the a connection is disconnected.
*
* @param conn
- * connection object
+ * connection object
*/
void disconnect(IConnection conn, IScope scope);
-
+ /**
+ * Called just before a child scope is added.
+ *
+ * @param scope
+ * scope that will be added
+ * @return <code>true</code> to allow, <code>false</code> to deny
+ */
boolean addChildScope(IBasicScope scope);
+ /**
+ * Called just after a child scope has been removed.
+ *
+ * @param scope
+ * scope that has been removed
+ */
void removeChildScope(IBasicScope scope);
/**
- * Called just before a client enters the scope
+ * Called just before a client enters the scope.
*
* @param client
- * client object
+ * client object
+ * @return <code>true</code> to allow, <code>false</code> to deny
*/
boolean join(IClient client, IScope scope);
/**
- * Called just after the client leaves the scope
+ * Called just after the client leaves the scope.
*
* @param client
- * client object
+ * client object
*/
void leave(IClient client, IScope scope);
/**
- * Called when a service is called
+ * Called when a service is called.
*
* @param call
- * the call object
+ * the call object
+ * @return <code>true</code> to allow, <code>false</code> to deny
*/
boolean serviceCall(IConnection conn, IServiceCall call);
Index: /java/server/trunk/src/org/red5/server/api/IScope.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IScope.java (revision 698)
+++ /java/server/trunk/src/org/red5/server/api/IScope.java (revision 936)
@@ -1,8 +1,3 @@
package org.red5.server.api;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import org.springframework.core.io.support.ResourcePatternResolver;
/*
@@ -25,6 +20,11 @@
*/
+import java.util.Iterator;
+import java.util.Set;
+
+import org.springframework.core.io.support.ResourcePatternResolver;
+
/**
- * The Scope Object.
+ * The scope object.
*
* A statefull object shared between a group of clients connected to the same
@@ -47,9 +47,9 @@
/**
- * Check to see if this scope has a child scope matching a given name
+ * Check to see if this scope has a child scope matching a given name.
*
* @param name
* the name of the child scope
- * @return true if a child scope exists, otherwise false
+ * @return <code>true</code> if a child scope exists, otherwise <code>false</code>
*/
public boolean hasChildScope(String name);
@@ -64,5 +64,5 @@
/**
- * Get a set of the child scope names
+ * Get a set of the child scope names.
*
* @return set containing child scope names
@@ -73,5 +73,5 @@
/**
- * Get a child scope by name
+ * Get a child scope by name.
*
* @param name
@@ -86,13 +86,14 @@
/**
- * Get a set of connected clients You can get the connections by passing the
- * scope to the clients lookupConnection method
+ * Get a set of connected clients. You can get the connections by passing the
+ * scope to the clients <code>getConnections</code> method.
*
* @return set containing all connected clients
+ * @see org.red5.server.api.IClient#getConnections(IScope)
*/
public Set<IClient> getClients();
/**
- * Get a connection iterator, you can call remove, and the connection will be closed.
+ * Get a connection iterator. You can call remove, and the connection will be closed.
* @return iterator holding all connections
*/
@@ -100,5 +101,5 @@
/**
- * Lookup connections
+ * Lookup connections.
*
* @param client object
Index: /java/server/trunk/src/org/red5/server/api/IBasicScope.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IBasicScope.java (revision 856)
+++ /java/server/trunk/src/org/red5/server/api/IBasicScope.java (revision 936)
@@ -1,7 +1,33 @@
package org.red5.server.api;
+
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
import org.red5.server.api.event.IEventObservable;
import org.red5.server.api.persistence.IPersistable;
+/**
+ * Base interface for all scope objects.
+ *
+ * @author The Red5 Project (red5 at osflash.org)
+ * @author Luke Hubbard (luke at codegent.com)
+ *
+ */
public interface IBasicScope
extends ICoreObject,
@@ -11,42 +37,43 @@
/**
- * Does this scope have a parent
+ * Does this scope have a parent?
*
- * @return true if this scope has a parent
+ * @return <code>true</code> if this scope has a parent, otherwise <code>false</code>
*/
public boolean hasParent();
/**
- * Get this scopes parent
+ * Get this scopes parent.
*
- * @return parent scope, or null if this scope doesn't have a parent
+ * @return parent scope, or <code>null</code> if this scope doesn't have a parent
*/
public IScope getParent();
/**
- * Get the scopes depth, how far down the scope tree is it
+ * Get the scopes depth, how far down the scope tree is it.
*
- * @return depth
+ * @return the depth
*/
public int getDepth();
/**
- * Get the name of this scope. eg. someroom
+ * Get the name of this scope. Eg. <code>someroom</code>.
*
- * @return name
+ * @return the name
*/
public String getName();
/**
- * Get the full absolute path. eg. host/myapp/someroom
+ * Get the full absolute path. Eg. <code>host/myapp/someroom</code>.
*
- * @return path
+ * @return the path
*/
public String getPath();
- public boolean isPersistent();
-
- public void setPersistent(boolean persistent);
-
+ /**
+ * Get the type of the scope.
+ *
+ * @return the type
+ */
public String getType();
Index: /java/server/trunk/src/org/red5/server/api/IMappingStrategy.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IMappingStrategy.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IMappingStrategy.java (revision 936)
@@ -1,3 +1,22 @@
package org.red5.server.api;
+
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
/**
@@ -6,6 +25,29 @@
public interface IMappingStrategy {
+ /**
+ * Map a name to the name of a service.
+ *
+ * @param name
+ * name to map
+ * @return the name of the service with the passed name
+ */
public String mapServiceName(String name);
+
+ /**
+ * Map a context path to the name of a scope handler.
+ *
+ * @param contextPath
+ * context path to map
+ * @return the name of a scope handler
+ */
public String mapScopeHandlerName(String contextPath);
+
+ /**
+ * Map a context path to a path prefix for resources.
+ *
+ * @param contextPath
+ * context path to map
+ * @return the path prefix for resources with the given name
+ */
public String mapResourcePrefix(String contextPath);
Index: /java/server/trunk/src/org/red5/server/api/IClient.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IClient.java (revision 651)
+++ /java/server/trunk/src/org/red5/server/api/IClient.java (revision 936)
@@ -1,6 +1,3 @@
package org.red5.server.api;
-
-import java.util.Collection;
-import java.util.Set;
/*
@@ -23,4 +20,7 @@
*/
+import java.util.Collection;
+import java.util.Set;
+
/**
* The client object represents a single client. One client may have multiple
@@ -37,36 +37,48 @@
/**
- * The key used to store the client object in a http session
+ * The key used to store the client object in a http session.
*/
public static final String ID = "red5.client";
/**
- * Get the unique ID for this client, this will be generated by the server
- * if not passed with connect
+ * Get the unique ID for this client. This will be generated by the server
+ * if not passed with connect.
*
- * @return String containing the id
+ * @return client id
*/
public String getId();
/**
- * Get the creation time for this client object
+ * Get the creation time for this client object.
*
- * @return long representing the time in milliseconds when this object was
- * created
+ * @return creation time in milliseconds
*/
public long getCreationTime();
/**
- * Get a set of scopes
+ * Get a set of scopes the client is connected to.
+ *
+ * @return set of scopes
*/
public Collection<IScope> getScopes();
/**
- * Get a set of connections
+ * Get a set of connections.
+ *
+ * @return set of connections
*/
public Set<IConnection> getConnections();
/**
- * Closes all the connections
+ * Get a set of connections to a given scope.
+ *
+ * @param scope
+ * scope to get connections for
+ * @return set of connections to the passed scope
+ */
+ public Set<IConnection> getConnections(IScope scope);
+
+ /**
+ * Closes all the connections.
*/
public void disconnect();
Index: /java/server/trunk/src/org/red5/server/api/ICoreObject.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/ICoreObject.java (revision 923)
+++ /java/server/trunk/src/org/red5/server/api/ICoreObject.java (revision 936)
@@ -1,3 +1,22 @@
package org.red5.server.api;
+
+/*
+ * RED5 Open Source Flash Server - http://www.osflash.org/red5
+ *
+ * Copyright © 2006 by respective authors (see below). All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later
+ * version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
import org.red5.server.api.event.IEventDispatcher;
@@ -5,4 +24,11 @@
import org.red5.server.api.event.IEventListener;
+/**
+ * Base interface containing common methods and attributs for all core objects.
+ *
+ * @author The Red5 Project (red5 at osflash.org)
+ * @author Luke Hubbard (luke at codegent.com)
+ *
+ */
public interface ICoreObject
extends
Index: /java/server/trunk/src/org/red5/server/api/IAttributeStore.java
===================================================================
--- /java/server/trunk/src/org/red5/server/api/IAttributeStore.java (revision 925)
+++ /java/server/trunk/src/org/red5/server/api/IAttributeStore.java (revision 936)
@@ -1,6 +1,3 @@
package org.red5.server.api;
-
-import java.util.Map;
-import java.util.Set;
/*
@@ -27,4 +24,7 @@
*/
+import java.util.Map;
+import java.util.Set;
+
/**
* Base interface for all API objects with attributes
@@ -36,5 +36,5 @@
/**
- * Get the attribute names
+ * Get the attribute names.
*
* @return set containing all attribute names
@@ -43,5 +43,5 @@
/**
- * Set an attribute on this object
+ * Set an attribute on this object.
*
* @param name
@@ -54,5 +54,5 @@
/**
- * Set multiple attributes on this object
+ * Set multiple attributes on this object.
*
* @param values
@@ -62,5 +62,5 @@
/**
- * Set multiple attributes on this object
+ * Set multiple attributes on this object.
*
* @param values
@@ -97,5 +97,5 @@
/**
- * Check the object has an attribute
+ * Check the object has an attribute.
*
* @param name
@@ -106,5 +106,5 @@
/**
- * Removes an attribute
+ * Remove an attribute.
*
* @param name
@@ -115,5 +115,5 @@
/**
- * Remove all attributes
+ * Remove all attributes.
*/
public void removeAttributes();
Index: /java/server/trunk/src/org/red5/server/api/ScopeUtils.java
===========================================================
Note:
Diffs are chopped if more than 30k.
This is to get past the limit on the mailing list.
More information about the Red5commits
mailing list