void deleteSessionData(long beforeDay) { SessionData sd = null; for (Iterator it = history.iterator(); it.hasNext(); ) { sd = (SessionData) it.next(); if (sd.getTime() < beforeDay) it.remove(); } }
RemoteIterator getSessionData(long start, long end) throws RemoteException { ArrayList al = new ArrayList(); SessionData sd = null; for (Iterator it = history.iterator(); it.hasNext(); ) { sd = (SessionData) it.next(); if (sd.getTime() >= start && sd.getTime() <= end) al.add(sd); } SessionData[] sdarray = new SessionData[al.size()]; for (int i = 0; i < sdarray.length; i++) sdarray[i] = (SessionData) al.get(i); return new SessionDataIterator(sdarray); }
public static XMLServers getCache() { XMLServers config = (XMLServers) SessionData.getXMLConfig(ConfigXMLInf.XMLCONFIG.SERVERS, XMLServers.class); return config; }