• Post Reply Bookmark Topic Watch Topic
  • New Topic

To remove inactive field

 
arun regu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working in chat session document now..
I need to remove inactive chat session by using thread..
The chat session input and output should be the same map only..
Tried a lot to solve this issue,but unable to succeed..
So please help me to solve this problem..
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there and welcome to Javaranch!

Are you able to elaborate on your question some more? It will help if you post some code details of where you are at
[ October 10, 2008: Message edited by: Martijn Verburg ]
 
arun regu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
package etr.action.chat;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import etr.chat.ChatSession;
import etr.chat.User;
import etr.common.ETRLogger;
import etr.common.LogCategory;
import etr.action.FX.FXBaseAction;
import etr.action.chat.ChatMainAction;
import etr.actionform.chat.GetChatSessionsForm;

import javax.swing.*;
import javax.swing.text.*;

public class InactiveChatSessionAction extends FXBaseAction {
private static ETRLogger logger = LogCategory.getActionLogger(InactiveChatSessionAction.class);

protected ActionForward executeAction(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception {

GetChatSessionsForm getChatSessionsForm = (GetChatSessionsForm)actionForm;
int status_id=getChatSessionsForm.getStatus();

User sender = new User(status_id);
if(ChatMainAction.status.get(sender.getStatus())!=0){

}
return actionMapping.findForward(SUCCESS);
}
}



Still I dint use thread..dnt knw where to use and how to use..

if(ChatMainAction.status.get(sender.getStatus())!=0){

in this if condn..status is a tree map..whch i need to give as input..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!