The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Problem with Collection/Arraylist

Posted by Carsten on October 21, 2000 at 4:27 AM

Hello Javafreaks,

I've got the following problem:

-Java 1.1 application (port communication)
-contains an arraylist (Collection threadList = new Arraylist())
-this application creates a new instance of another class, a listener which monitors port activity on a specific TCP port.
-every time a connection request on this port is detected this listener class creates an instance of a third class which will handle the communication.
-I have to add those instances to my threadList.
-If I do this from within the listener class using an interface method I have created in my base class the threadList collection remains empty.
-If I try to add a new object from within my base class it works as expected.

What can I do?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us