Skip to content

Commit

Permalink
Javadoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mondain committed Feb 7, 2015
1 parent e269d04 commit 637a9ef
Show file tree
Hide file tree
Showing 90 changed files with 470 additions and 418 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/red5/server/AttributeStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public AttributeStore(IAttributeStore values) {
}

/**
* Filter <code>null</code> keys and values from given map.
* Filter <pre>null</pre> keys and values from given map.
*
* @param values
* the map to filter
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/red5/server/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public List<String> iterateScopeNameList() {
/**
* Returns registration status of given connection.
*
* @param conn
* @param conn connection
* @return true if registered and false otherwise
*/
public boolean isRegistered(IConnection conn) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/red5/server/ClientRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public ClientList<Client> getClientList() {
/**
* Check if client registry contains clients.
*
* @return <code>True</code> if clients exist, otherwise <code>False</code>
* @return <pre>True</pre> if clients exist, otherwise <pre>False</pre>
*/
protected boolean hasClients() {
return !clients.isEmpty();
Expand Down
23 changes: 13 additions & 10 deletions src/main/java/org/red5/server/adapter/AbstractScopeAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,43 @@ public abstract class AbstractScopeAdapter implements IScopeHandler {

/**
* Can start flag.
* <code>true</code> if scope is ready to be activated, <code>false</code> otherwise
* <pre>true</pre> if scope is ready to be activated, <pre>false</pre> otherwise
*/
private boolean canStart = true;

/**
* Can connect flag.
* <code>true</code> if connections to scope are allowed, <code>false</code> otherwise
* <pre>true</pre> if connections to scope are allowed, <pre>false</pre> otherwise
*/
private boolean canConnect;

/**
* Can join flag.
* <code>true</code> if scope may be joined by users, <code>false</code> otherwise
* <pre>true</pre> if scope may be joined by users, <pre>false</pre> otherwise
*/
private boolean canJoin = true;

/**
* Can call service flag.
* <code>true</code> if remote service calls are allowed for the scope, <code>false</code> otherwise
* <pre>true</pre> if remote service calls are allowed for the scope, <pre>false</pre> otherwise
*/
private boolean canCallService = true;

/**
* Can add child scope flag. <code>true</code> if scope is allowed to add child scopes, <code>false</code> otherwise
* Can add child scope flag. <pre>true</pre> if scope is allowed to add child scopes, <pre>false</pre> otherwise
*/
private boolean canAddChildScope = true;

/**
* Can handle event flag.
* <code>true</code> if events handling is allowed, <code>false</code> otherwise
* <pre>true</pre> if events handling is allowed, <pre>false</pre> otherwise
*/
private boolean canHandleEvent = true;

/**
* Setter for can start flag.
*
* @param canStart <code>true</code> if scope is ready to be activated, <code>false</code> otherwise
* @param canStart <pre>true</pre> if scope is ready to be activated, <pre>false</pre> otherwise
*/
public void setCanStart(boolean canStart) {
this.canStart = canStart;
Expand All @@ -83,7 +83,7 @@ public void setCanStart(boolean canStart) {
/**
* Setter for can call service flag
*
* @param canCallService <code>true</code> if remote service calls are allowed for the scope, <code>false</code> otherwise
* @param canCallService <pre>true</pre> if remote service calls are allowed for the scope, <pre>false</pre> otherwise
*/
public void setCanCallService(boolean canCallService) {
//log.trace("setCanCallService: {}", canCallService);
Expand All @@ -93,7 +93,7 @@ public void setCanCallService(boolean canCallService) {
/**
* Setter for can connect flag
*
* @param canConnect <code>true</code> if connections to scope are allowed, <code>false</code> otherwise
* @param canConnect <pre>true</pre> if connections to scope are allowed, <pre>false</pre> otherwise
*/
public void setCanConnect(boolean canConnect) {
this.canConnect = canConnect;
Expand All @@ -102,7 +102,7 @@ public void setCanConnect(boolean canConnect) {
/**
* Setter for 'can join' flag
*
* @param canJoin <code>true</code> if scope may be joined by users, <code>false</code> otherwise
* @param canJoin <pre>true</pre> if scope may be joined by users, <pre>false</pre> otherwise
*/
public void setJoin(boolean canJoin) {
this.canJoin = canJoin;
Expand Down Expand Up @@ -160,6 +160,7 @@ public boolean handleEvent(IEvent event) {

/**
* Calls the checkBandwidth method on the current client.
*
* @param o Object passed from Flash, not used at the moment
*/
public void checkBandwidth(Object o) {
Expand All @@ -172,7 +173,9 @@ public void checkBandwidth(Object o) {

/**
* Calls the checkBandwidthUp method on the current client.
*
* @param params Object passed from Flash
* @return bandwidth results map
*/
public Map<String, Object> checkBandwidthUp(Object[] params) {
//Incoming object should be null
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/red5/server/adapter/IApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface IApplication {
*
* @param app Application or room level scope. See
* {@link org.red5.server.api.scope.IScope} for details
* @return <code>true</code> continues application run, <code>false</code>
* @return <pre>true</pre> continues application run, <pre>false</pre>
* terminates
*/
public boolean appStart(IScope app);
Expand All @@ -49,7 +49,7 @@ public interface IApplication {
* See {@link org.red5.server.api.IConnection}
* @param params List of params sent from client with NetConnection.connect
* call
* @return <code>true</code> accepts the connection, <code>false</code>
* @return <pre>true</pre> accepts the connection, <pre>false</pre>
* rejects it
*/
public boolean appConnect(IConnection conn, Object[] params);
Expand All @@ -59,7 +59,7 @@ public interface IApplication {
*
* @param client Client object
* @param app Scope object
* @return <code>true</code> accepts the client, <code>false</code>
* @return <pre>true</pre> accepts the client, <pre>false</pre>
* rejects it
*/
public boolean appJoin(IClient client, IScope app);
Expand Down Expand Up @@ -90,7 +90,7 @@ public interface IApplication {
* Called on application room start
*
* @param room Scope object
* @return <code>true</code> if scope can be started, <code>false</code>
* @return <pre>true</pre> if scope can be started, <pre>false</pre>
* otherwise
*/
public boolean roomStart(IScope room);
Expand All @@ -101,7 +101,7 @@ public interface IApplication {
* @param conn Connection object
* @param params List of params sent from client with NetConnection.connect
* call
* @return <code>true</code> accepts the connection, <code>false</code>
* @return <pre>true</pre> accepts the connection, <pre>false</pre>
* rejects it
*/
public boolean roomConnect(IConnection conn, Object[] params);
Expand All @@ -111,7 +111,7 @@ public interface IApplication {
*
* @param client Client object
* @param room Scope object
* @return <code>true</code> accepts the client, <code>false</code>
* @return <pre>true</pre> accepts the client, <pre>false</pre>
* rejects it
*/
public boolean roomJoin(IClient client, IScope room);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public List<PluginDescriptor> getPlugins() {
/**
* Adds a list of plug-in descriptors
*
* @param plugins
* @param plugins plugins
*/
public void setPlugins(List<PluginDescriptor> plugins) {
this.plugins = plugins;
Expand Down Expand Up @@ -169,7 +169,7 @@ public boolean setAttributes(Map<String, Object> attributes) {
/**
* Creates child scope
* @param name Child scope name
* @return <code>true</code> on success, <code>false</code> otherwise
* @return <pre>true</pre> on success, <pre>false</pre> otherwise
*/
public boolean createChildScope(String name) {
if (!scope.hasChildScope(name)) {
Expand Down Expand Up @@ -208,7 +208,7 @@ public Set<IClient> getClients() {
/**
* Returns all connections in the scope
*
* @return Connections
* @return collection of a set of connections
*/
@SuppressWarnings("deprecation")
public Collection<Set<IConnection>> getConnections() {
Expand All @@ -218,8 +218,8 @@ public Collection<Set<IConnection>> getConnections() {
/**
* Returns all connections for a given client
*
* @param client
* @return Connections
* @param client client
* @return set of connections
*/
@SuppressWarnings("deprecation")
public Set<IConnection> lookupConnections(IClient client) {
Expand Down Expand Up @@ -274,15 +274,15 @@ public String getPath() {
/**
* Whether this scope has a child scope with given name
* @param name Child scope name
* @return <code>true</code> if it does have it, <code>false</code> otherwise
* @return <pre>true</pre> if it does have it, <pre>false</pre> otherwise
*/
public boolean hasChildScope(String name) {
return scope.hasChildScope(name);
}

/**
* If this scope has a parent
* @return <code>true</code> if this scope has a parent scope, <code>false</code> otherwise
* @return <pre>true</pre> if this scope has a parent scope, <pre>false</pre> otherwise
*/
public boolean hasParent() {
return scope.hasParent();
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/org/red5/server/api/IAttributeStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,16 @@ public interface IAttributeStore extends AttributeStoreMXBean {
/**
* Return the value for a given attribute and set it if it doesn't exist.
*
* <p>
* This is a utility function that internally performs the following code:
* <p>
* <code>
* if (!hasAttribute(name)) setAttribute(name, defaultValue);<br>
* return getAttribute(name);<br>
* </code>
* </p>
* </p>
* <br>
* <pre>
* if (!hasAttribute(name))
* setAttribute(name, defaultValue);
* return getAttribute(name);
* </pre>
*
* @param name the name of the attribute to get
* @param defaultValue the value of the attribute to set if the attribute doesn't
* exist
* @param defaultValue the value of the attribute to set if the attribute doesn't exist
* @return the attribute value
*/
public Object getAttribute(String name, Object defaultValue);
Expand Down
32 changes: 18 additions & 14 deletions src/main/java/org/red5/server/api/IClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ public interface IClient extends IAttributeStore {
/**
* Get the unique ID for this client. This will be generated by the server
* if not passed upon connection from client-side Flex/Flash app. To assign a custom ID to the client use
* <code>params</code> object of {@link IApplication#appConnect(IConnection, Object[])} method, that
* contains 2nd all the rest values you pass to <code>NetConnection.connect</code> method.
*
* <pre>params</pre> object of {@link IApplication#appConnect(IConnection, Object[])} method, that
* contains 2nd all the rest values you pass to <pre>NetConnection.connect</pre> method.
* <br>
* Example:
*
* <br>
* At client side:
* <code>
* <pre>
* NetConnection.connect("http://localhost/killerapp/", "user123");
* </code>
*
* </pre>
* <br>
* then at server side:
* <code>
* <pre>
* public boolean appConnect( IConnection connection, Object[] params){
* try {
* connection.getClient().setAttribute("param0", (String) params[0]);
* } catch(Exception e){<br/>
* } catch(Exception e){
* log.error("{}", e);
* }
* }
* </code>
* </pre>
*
* @return client id
*/
Expand Down Expand Up @@ -111,7 +111,7 @@ public interface IClient extends IAttributeStore {
* Set the permissions for this client in a given context.
*
* @param conn Connection specifying the context to set the permissions for.
* @param permissions Permissions the client has in this context or <code>null</code> for no permissions.
* @param permissions Permissions the client has in this context or <pre>null</pre> for no permissions.
*/
public void setPermissions(IConnection conn, Collection<String> permissions);

Expand All @@ -126,9 +126,9 @@ public interface IClient extends IAttributeStore {
/**
* Check if the client has a permission in the given context.
*
* @param conn Connection specifying the context to check the permissions for.
* @param permissionName Name of the permission to check.
* @return <code>true</code> if the client has the permission, otherwise <code>false</code>
* @param conn Connection specifying the context to check the permissions for
* @param permissionName Name of the permission to check
* @return <pre>true</pre> if the client has the permission, otherwise <pre>false</pre>
*/
public boolean hasPermission(IConnection conn, String permissionName);

Expand All @@ -141,11 +141,15 @@ public interface IClient extends IAttributeStore {
/**
* Performs a bandwidth checking callback for the client.
* Information may be found here: http://www.adobe.com/devnet/flashmediaserver/articles/dynamic_stream_switching_04.html
*
* @param params parameters
* @return bandwidth results
*/
public Map<String, Object> checkBandwidthUp(Object[] params);

/**
* Returns whether or not a bandwidth check has been requested.
*
* @return true if requested and false otherwise
*/
public boolean isBandwidthChecked();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/red5/server/api/IClientRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IClientRegistry {
* Check if a client with a given id exists.
*
* @param id the id of the client to check for
* @return <code>true</code> if the client exists, <code>false</code> otherwise
* @return <pre>true</pre> if the client exists, <pre>false</pre> otherwise
*/
public boolean hasClient(String id);

Expand All @@ -62,7 +62,7 @@ public interface IClientRegistry {
/**
* Adds a client to the registry.
*
* @param client
* @param client client
*/
public void addClient(IClient client);

Expand Down
Loading

0 comments on commit 637a9ef

Please sign in to comment.