/*
 * @#IncomingNetworkServiceConnectionRequestEvent.java - 2015
 * Copyright bitDubai.com., All rights reserved.
 * You may not modify, use, reproduce or distribute this software.
 * BITDUBAI/CONFIDENTIAL
 */
package com.bitdubai.fermat_p2p_api.layer.p2p_communication.cloud_server.events;

import com.bitdubai.fermat_p2p_api.layer.p2p_communication.CommunicationChannels;
import com.bitdubai.fermat_api.layer.all_definition.event.PlatformEvent;
import com.bitdubai.fermat_api.layer.pip_platform_service.event_manager.EventSource;
import com.bitdubai.fermat_api.layer.pip_platform_service.event_manager.EventType;

import java.util.UUID;

/**
 * The Class <code>com.bitdubai.fermat_api.layer.platform_service.event_manager.events.IncomingNetworkServiceConnectionRequestEvent</code> represent the event
 * when a new Incoming Network Service Connection Request is made
 * <p/>
 * Created by Roberto Requena - (rart3001@gmail.com) on 07/06/15.
 *
 * @version 1.0
 * @since Java JDK 1.7
 */
public class IncomingNetworkServiceConnectionRequestEvent implements PlatformEvent {

    /**
     *  Represent the eventType
     */
    private EventType eventType;

    /**
     *  Represent the eventSource
     */
    private EventSource eventSource;

    /**
     *  Represent the remoteNetworkService
     */
    private UUID remoteNetworkService;

    /**
     *  Represent the communicationChannels
     */
    private CommunicationChannels communicationChannels;

    /**
     * Constructor with parameter
     *
     * @param eventType
     */
    public IncomingNetworkServiceConnectionRequestEvent(EventType eventType){
        this.eventType = eventType;
    }

    /**
     * Constructor with parameters
     *
     * @param communicationChannels
     * @param eventSource
     * @param eventType
     * @param remoteNetworkService
     */
    public IncomingNetworkServiceConnectionRequestEvent(CommunicationChannels communicationChannels, EventSource eventSource, EventType eventType, UUID remoteNetworkService) {
        this.communicationChannels = communicationChannels;
        this.eventSource = eventSource;
        this.eventType = eventType;
        this.remoteNetworkService = remoteNetworkService;
    }

    /**
     * (non-Javadoc)
     *
     * @see PlatformEvent#getEventType()
     */
    @Override
    public EventType getEventType() {
        return this.eventType;
    }

    /**
     * (non-Javadoc)
     *
     * @see PlatformEvent#setSource(EventSource)
     */
    @Override
    public void setSource(EventSource eventSource) {
        this.eventSource = eventSource;
    }

    /**
     * (non-Javadoc)
     *
     * @see PlatformEvent#getSource()
     */
    @Override
    public EventSource getSource() {
        return this.eventSource;
    }

    /**
     * Return the communication channels for the connection
     *
     * @return CommunicationChannels
     */
    public CommunicationChannels getCommunicationChannels() {
        return communicationChannels;
    }

    /**
     * Set the communication channels for the connection
     *
     * @return CommunicationChannels
     */
    public void setCommunicationChannels(CommunicationChannels communicationChannels) {
        this.communicationChannels = communicationChannels;
    }

    /**
     * Get the id of the remote network service
     *
     * @return UUID
     */
    public UUID getRemoteNetworkService() {
        return remoteNetworkService;
    }

    /**
     * Set the id of the remote network service
     *
     * @return UUID
     */
    public void setRemoteNetworkService(UUID remoteNetworkService) {
        this.remoteNetworkService = remoteNetworkService;
    }
}

@@ -1280,32 +1280,41 @@
 teNetworkService
+PublicKey
 %0A     */%0A    pri
@@ -1318,20 +1318,22 @@
 private 
-UUID
+String
  remoteN
@@ -1345,16 +1345,25 @@
 kService
+PublicKey
 ;%0A%0A    /
@@ -1843,24 +1843,33 @@
 tworkService
+PublicKey
 %0A     */%0A   
@@ -2012,20 +2012,22 @@
 ntType, 
-UUID
+String
  remoteN
@@ -2031,32 +2031,41 @@
 teNetworkService
+PublicKey
 ) %7B%0A        this
@@ -2213,32 +2213,41 @@
 teNetworkService
+PublicKey
  = remoteNetwork
@@ -2245,32 +2245,41 @@
 teNetworkService
+PublicKey
 ;%0A    %7D%0A%0A    /**
@@ -3344,197 +3344,29 @@
   * 
-Get the id of the remote network service%0A     *%0A     * @return UUID%0A     */%0A    public UUID getRemoteNetworkService() %7B%0A        return remoteNetworkService;%0A    %7D%0A%0A    /**%0A     * Set the id
+Return the public key
  of 
@@ -3392,23 +3392,16 @@
 service%0A
-     *%0A
      * @
@@ -3410,13 +3410,8 @@
 turn
- UUID
 %0A   
@@ -3426,22 +3426,24 @@
  public 
-void s
+String g
 etRemote
@@ -3460,73 +3460,36 @@
 vice
-(UUID remoteNetworkService) %7B%0A        this.remoteNetworkService =
+PublicKey() %7B%0A        return
  rem
@@ -3505,16 +3505,25 @@
 kService
+PublicKey
 ;%0A    %7D%0A

Change the UUID id of the remote network service to remoteNetworkServicePublicKey