Class CustomerManagerServer

    • Method Detail

      • addCustomer

        public void addCustomer​(java.lang.String customerId,
                                java.lang.String lastName,
                                java.lang.String firstName,
                                java.lang.String street,
                                java.lang.String zipCode,
                                java.lang.String city)
                         throws java.rmi.RemoteException
        Description copied from interface: CustomerManager
        For testing, adds a customer to the manager's database
        Specified by:
        addCustomer in interface CustomerManager
        Parameters:
        customerId - identifier
        lastName - person's last name
        firstName - person's first name
        street - address field
        zipCode - address field
        city - address field
        Throws:
        java.rmi.RemoteException - on communication error
      • findCustomer

        public Customer findCustomer​(java.lang.String customerId)
                              throws java.rmi.RemoteException
        Description copied from interface: CustomerManager
        Returns the remote interface for the customer entity
        Specified by:
        findCustomer in interface CustomerManager
        Parameters:
        customerId - identifier
        Returns:
        entity or null if not found
        Throws:
        java.rmi.RemoteException - on communication error
      • findCustomerReturnDto

        public Customer findCustomerReturnDto​(java.lang.String customerId)
                                       throws java.rmi.RemoteException
        Description copied from interface: CustomerManager
        Returns the DATA TRANSFER OBJECT for the customer entity
        Specified by:
        findCustomerReturnDto in interface CustomerManager
        Parameters:
        customerId - identifier
        Returns:
        dto or null if not found
        Throws:
        java.rmi.RemoteException - on communication error
      • main

        public static void main​(java.lang.String[] args)
        Creates stand-alone console server
        Parameters:
        args - first argument may optionally specify the port