/***************************************************************************
 *   Copyright (C) by Fabrizio Montesi                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 *                                                                         *
 *   For details about the authors of this software, see the AUTHORS file. *
 ***************************************************************************/

package joliex.rmi;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.HashSet;
import java.util.Set;
import jolie.Interpreter;
import jolie.net.LocalCommChannel;
import jolie.net.CommListener;

/**
 *
 * @author Fabrizio Montesi
 */
public class JolieRemoteImpl implements JolieRemote
{
	final private Interpreter interpreter;
	final private CommListener listener;
	final private Set< RemoteBasicChannel > channels = new HashSet< RemoteBasicChannel >();

	public JolieRemoteImpl( Interpreter interpreter, CommListener listener )
		throws RemoteException
	{
		this.interpreter = interpreter;
		this.listener = listener;
	}

	public RemoteBasicChannel createRemoteBasicChannel()
		throws RemoteException
	{
		RemoteBasicChannelImpl channel = new RemoteBasicChannelImpl( interpreter.commCore().getLocalCommChannel( listener ), this );
		channels.add( channel );
		return (RemoteBasicChannel)UnicastRemoteObject.exportObject( channel );
	}

	protected void disposeOf( RemoteBasicChannel channel )
	{
		channels.remove( channel );
	}
}

@@ -1645,107 +1645,24 @@
 rt j
-ava.util.HashSet;%0Aimport java.util.Set;%0Aimport jolie.Interpreter;%0Aimport jolie.net.LocalCommChannel
+olie.Interpreter
 ;%0Aim
@@ -1865,97 +1865,8 @@
 ner;
-%0A%09final private Set%3C RemoteBasicChannel %3E channels = new HashSet%3C RemoteBasicChannel %3E();
 %0A%0A%09p
@@ -2031,16 +2031,27 @@
 er;%0A%09%7D%0A%0A
+%09@Override%0A
 %09public 
@@ -2255,35 +2255,8 @@
  );%0A
-%09%09channels.add( channel );%0A
 %09%09re
@@ -2389,41 +2389,11 @@
 l )%0A
+
 %09%7B%0A
-%09%09channels.remove( channel );%0A
 %09%7D%0A%7D

Clean unused code.