public CommunicationProtocol(InetAddress inetAddress, int port, UserManagement userManagement, String analyticsServerRef, String billingServerRef, Registry registry) {
		this.inetAddress = inetAddress;
		this.tcpPort = port;
		this.userManagement = userManagement;
		this.analyticsServerRef = analyticsServerRef;
		this.billingServerRef = billingServerRef;
		this.registry = registry;
		
		try {
			mClientHandler = (MClientHandler_RO) registry.lookup(analyticsServerRef);
		} catch (AccessException e1) {
			logger.error("Access to the registry denied");
		} catch (RemoteException e1) {
			logger.error("Failed to connect to the Analytics Server");
		} catch (NotBoundException e1) {
			logger.error("Analytics Server not bound to the registry");
		}
                
		try {
			billingServerHandler = (BillingServer_RO) registry.lookup(billingServerRef);
			this.billingServerLogin();
		} catch (AccessException e1) {
			logger.error("Access to the registry denied");
		} catch (RemoteException e1) {
			System.out.println("Failed to connect to the Billing Server");
		} catch (NotBoundException e1) {
			logger.error("Billing Server not bound. Ref:" + billingServerRef);
		}
	}