[Red5] Spring AOP and application methods
Daniel Rossi
spam at electroteque.org
Tue Nov 6 06:03:17 PST 2007
On 07/11/2007, at 12:52 AM, Daniel Rossi wrote:
>
>
> Does anyone have any idea where createChildScope is being called ?
> I believe addChildScope is also being called for application parent
> scopes as they are child scopes of the default root scope.
>
> <aop:after-returning
> pointcut="execution(* *createChildScope(..))"
> method="debug"
> />
>
> This doesnt seem to be called any ideas where its being referenced
> from ? I cant work it out but its definitely being called inside
> Scope.
Never mind cant work it out tonight. Ive got to call the scope check
during the connection not after the scope creation process which id
like to do. At least the logger AOP is working again.
public IClient newClient(Object[] params) throws
ClientNotFoundException, ClientRejectedException {
IConnection conn = Red5.getConnectionLocal();
scope = conn.getScope();
if ((conn.getConnectParams().get("pageUrl") == null) ||
(conn.getConnectParams().get("pageUrl")!=null && referers.indexOf
(conn.getConnectParams().get("pageUrl").toString()) < 0))
{
log.error("Client Rejected Referring Page Not In the List");
throw new ClientRejectedException();
}
if (!checkScope(scope))
{
throw new ClientRejectedException();
}
client = new StreamClient(nextId(), this);
addClient(client);
return client;
}
public boolean checkScope(IBasicScope scope)
{
for (Iterator iter = scopeRegistry.getStreamPoints().iterator();
iter.hasNext();) {
StreamPoints element = (StreamPoints) iter.next();
if (scope.getName().equals(element.getStreamPoint()))
{
log.info("Scope Is in the list");
return true;
}
}
log.error("Client Rejected Stream Point Not In the List");
return false;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20071107/c6116f05/attachment-0001.html
More information about the Red5
mailing list