Note that there are some explanatory texts on larger screens.

plurals
  1. POJAVA: Type mismatch: cannot convert from Collection<Set<IConnection>> to Iterator<IConnection>
    primarykey
    data
    text
    <p>I have a Problem here using Java in Red5 0.9 Server here's the code</p> <pre><code>package com.hwakin.i5lc.manager; import java.util.Iterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IClient; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.red5.server.api.Red5; import org.red5.server.api.service.IServiceCapableConnection; import com.hwakin.i5l.vo.ExternalPoint; import com.hwakin.i5l.vo.UserInfo; import com.hwakin.i5lc.vo.ExternalDrawInfo; public class I5lcDrawManager extends ApplicationAdapter { protected static Log log = LogFactory.getLog(I5lcDrawManager.class.getName()); public void startDrawingHandler(String type,ExternalPoint point, ExternalDrawInfo data){ try{ IConnection Lconn = Red5.getConnectionLocal(); IScope scope = Lconn.getScope(); Iterator&lt;IConnection&gt; it = scope.getConnections(); while (it.hasNext()) { IConnection conn = it.next(); if (Lconn.equals(conn)) { continue; } log.info("i5lvDrawManagerReceiver.startDrawingHandler invoked."); IClient client = conn.getClient(); UserInfo userInfo =(UserInfo) client.getAttribute("userInfo"); if (conn instanceof IServiceCapableConnection) { if(userInfo.lectureInfo.sync.equals("true")){ ((IServiceCapableConnection) conn).invoke("invoke",new Object[]{"i5lvDrawManagerReceiver.startDrawingHandler",type,point,data}); } } } }catch(Exception e){ log.debug("Exception in noticeChattingTo Method:"+e); } } public void drawingHandler(String type,ExternalPoint point){ try{ IConnection Lconn = Red5.getConnectionLocal(); IScope scope = Lconn.getScope(); Iterator&lt;IConnection&gt; it = scope.getConnections(); while (it.hasNext()) { IConnection conn = it.next(); if (Lconn.equals(conn)) { continue; } log.info("i5lvDrawManagerReceiver.drawingHandler invoked."); IClient client = conn.getClient(); UserInfo userInfo =(UserInfo) client.getAttribute("userInfo"); if (conn instanceof IServiceCapableConnection) { if(userInfo.lectureInfo.sync.equals("true")){ ((IServiceCapableConnection) conn).invoke("invoke",new Object[]{"i5lvDrawManagerReceiver.drawingHandler",type,point}); } } } }catch(Exception e){ log.debug("Exception in noticeChattingTo Method:"+e); } } public void endDrawingHandler(String type,ExternalPoint point, ExternalDrawInfo data){ try{ IConnection Lconn = Red5.getConnectionLocal(); IScope scope = Lconn.getScope(); Iterator&lt;IConnection&gt; it = scope.getConnections(); while (it.hasNext()) { IConnection conn = it.next(); if (Lconn.equals(conn)) { continue; } log.info("i5lvDrawManagerReceiver.endDrawingHandler invoked."); IClient client = conn.getClient(); UserInfo userInfo =(UserInfo) client.getAttribute("userInfo"); if (conn instanceof IServiceCapableConnection) { if(userInfo.lectureInfo.sync.equals("true")){ ((IServiceCapableConnection) conn).invoke("invoke",new Object[]{"i5lvDrawManagerReceiver.endDrawingHandler",type,point,data}); } } } }catch(Exception e){ log.debug("Exception in noticeChattingTo Method:"+e); } } } </code></pre> <p>The Errors are:</p> <ol> <li><p>ERROR in /opt/red5/dist/webapps/i5lecture/WEB-INF/src/com/hwakin/i5lc/manager/I5lcDrawManager.java (at line 29)</p> <pre><code>Iterator &lt;IConnection&gt; it = scope.getConnections(); </code></pre></li> </ol> <h2>Type mismatch: cannot convert from Collection&lt;Set&lt;IConnection>> to Iterator</h2> <ol start="2"> <li><p>ERROR in /opt/red5/dist/webapps/i5lecture/WEB-INF/src/com/hwakin/i5lc/manager/I5lcDrawManager.java (at line 63)</p> <pre><code>Iterator&lt;IConnection&gt; it = scope.getConnections(); </code></pre></li> </ol> <h2>Type mismatch: cannot convert from Collection&lt;Set&lt;IConnection>> to Iterator&lt;IConnection></h2> <ol start="3"> <li><p>ERROR in /opt/red5/dist/webapps/i5lecture/WEB-INF/src/com/hwakin/i5lc/manager/I5lcDrawManager.java (at line 100)</p> <pre><code>Iterator&lt;IConnection&gt; it = scope.getConnections(); </code></pre></li> </ol> <h2>Type mismatch: cannot convert from Collection&lt;Set&lt;IConnection>> to Iterator&lt;IConnection></h2> <p>3 problems (3 errors)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload