Class MasterServer

All Implemented Interfaces:
ClientInterface, HandlerInterface, ProviderInterface, RemoteServer, MBeanListener, MBeanService, MonitorCallback, ToBeStarted, MasterInterface, Serializable, Remote

public final class MasterServer extends ECaccessProvider implements HandlerInterface, MasterInterface
The Class MasterServer.
See Also:
  • Field Details

    • dataCache

      public final transient ECpdsBase.DataTransferCache dataCache
      The data cache. Allow getting latest update of the DataTransfer when calling method from The data cache!
  • Constructor Details

  • Method Details

    • getVersion

      public String getVersion()
      Gets the version. Gets the version.
      Specified by:
      getVersion in class StarterServer
      Returns:
      the version
    • getManagementInterface

      public ManagementInterface getManagementInterface()
      Gets the management interface.
    • getDataBaseInterface

      public DataBaseInterface getDataBaseInterface()
      Gets the data base interface.
    • getAttachmentAccessInterface

      public DataAccessInterface getAttachmentAccessInterface()
      Gets the attachment access interface.
    • getDataFileAccessInterface

      public DataAccessInterface getDataFileAccessInterface()
      Gets the data file access interface. Gets the data file access interface.
      Specified by:
      getDataFileAccessInterface in interface MasterInterface
      Returns:
      the data file access interface
    • getEventScriptContent

      public String getEventScriptContent()
      Gets the event script content.
      Returns:
      the event script content
    • getDestination

      public Destination getDestination(String name)
      Gets the destination. Gets the destination.
      Specified by:
      getDestination in interface MasterInterface
      Parameters:
      name - the name
      Returns:
      the destination
    • isValidDataFile

      public boolean isValidDataFile(long dataFileId)
      Checks if is valid data file. Checks if is valid data file. This method is called by the cleaning scheduler on the DataMovers to check if a DataFile still exists and is valid? Otherwise the DataFile is removed from the DataMover storage system.
      Specified by:
      isValidDataFile in interface MasterInterface
      Parameters:
      dataFileId - the data file id
      Returns:
      true, if is valid data file
    • getIncomingUserHash

      public String getIncomingUserHash(String incomingUser)
      Return a hash of the specified incoming user (the string is in the form userid:password). Gets the incoming user hash.
      Specified by:
      getIncomingUserHash in interface MasterInterface
      Parameters:
      incomingUser - the incoming user
      Returns:
      hash, if the user is found
    • getS3AuthorizationSignature

      public byte[] getS3AuthorizationSignature(String incomingUser, String prefix, String data, String algorithm)
      Return a hash of the specified incoming user (the string is in the form userid:password). Gets the s 3 authorization signature.
      Specified by:
      getS3AuthorizationSignature in interface MasterInterface
      Parameters:
      incomingUser - the incoming user
      prefix - the prefix (e.g. AWS4)
      data - the data
      algorithm - the algorithm
      Returns:
      authorization signature
    • getIncomingProfile

      public IncomingProfile getIncomingProfile(String incomingUser, String incomingPassword, String from) throws DataBaseException, MasterException
      Gets the incoming profile. Gets the incoming profile.
      Specified by:
      getIncomingProfile in interface MasterInterface
      Parameters:
      incomingUser - the incoming user
      incomingPassword - the incoming password
      from - the from
      Returns:
      the incoming profile
      Throws:
      DataBaseException - the data base exception
      MasterException - the master exception
    • getTransferScheduler

      public TransferScheduler getTransferScheduler() throws MasterException
      Gets the transfer scheduler.
      Returns:
      the transfer scheduler
      Throws:
      MasterException - the master exception
    • lockTransfer

      public ProgressInterface lockTransfer(String key, ProgressInterface plugin)
      Check if a lock has not yet been set on the specific key. If the lock is not set then lock on behalf of the object parameter otherwise return the object which has been used to lock the key. This method is dedicated to the ECpdsPlugin which use it to avoid having parallel requests for the same transfer request.
      Parameters:
      key - the unique key
      plugin - the plugin
      Returns:
      the ecpds plugin interface
    • lockDataFile

      public void lockDataFile(String key)
      Lock a data file. This method is used by the ECpdsPlugin to record which DataFiles are in the process of being retrieved without using a Download Scheduler.
      Parameters:
      key - the key
    • unlockTransfer

      public void unlockTransfer(String key)
      Unlock the data transfer and associated data file for the specified unique key.
      Parameters:
      key - the unique key of the data transfer
    • transferIsLocked

      public boolean transferIsLocked(String key)
      Check if the data transfer for the specified unique key is locked. This method is used by the DownloadScheduler to avoid downloading a file which is still processed by the ECpdsPlugin.
      Parameters:
      key - the unique key of the data transfer
      Returns:
      true, if successful
    • getDownloadScheduler

      public MasterServer.DownloadScheduler getDownloadScheduler(boolean acquisition) throws MasterException
      Gets the download scheduler.
      Parameters:
      acquisition - the acquisition
      Returns:
      the download scheduler
      Throws:
      MasterException - the master exception
    • getDataTransfers

      public DataTransfer[] getDataTransfers(long dataFileId) throws DataBaseException
      Gets the data transfers.
      Parameters:
      dataFileId - the data file id
      Returns:
      the data transfers
      Throws:
      DataBaseException - the data base exception
    • getDestinationSchedulerCache

      public DestinationSchedulerCache getDestinationSchedulerCache(String destinationName) throws MonitorException, MasterException, DataBaseException
      Gets the destination scheduler cache.
      Parameters:
      destinationName - the destination name
      Returns:
      the destination scheduler cache
      Throws:
      MonitorException - the monitor exception
      MasterException - the master exception
      DataBaseException - the data base exception
    • getDestinationSchedulerCache

      public DestinationSchedulerCache getDestinationSchedulerCache(String destinationName, String statusCode) throws MonitorException, MasterException, DataBaseException
      Gets the destination scheduler cache.
      Parameters:
      destinationName - the Destination name
      statusCode - the Status Code
      Returns:
      the destination scheduler cache
      Throws:
      MonitorException - the monitor exception
      MasterException - the master exception
      DataBaseException - the data base exception
    • getDestinationCaches

      Gets the destination caches.
      Returns:
      the destination caches
      Throws:
      MonitorException - the monitor exception
      MasterException - the master exception
      DataBaseException - the data base exception
    • getDestinationCache

      public DestinationCache getDestinationCache(String destinationName) throws MonitorException, MasterException, DataBaseException
      Gets the destination cache. This is called when a host or a destination is duplicated, so the calculation of the number of bad data transfers is not relevant (0 if it is a new destination and same as before in the cache if it is a new host).
      Parameters:
      destinationName - the destination name
      Returns:
      the destination cache
      Throws:
      MonitorException - the monitor exception
      MasterException - the master exception
      DataBaseException - the data base exception
    • getECpdsBase

      public ECpdsBase getECpdsBase()
      Gets the ecpds base.
      Returns:
      the ecpds base
    • getTicketRepository

      public TicketRepository getTicketRepository()
      Gets the ticket repository.
      Returns:
      the ticket repository
    • purgeDataBase

      public void purgeDataBase(long milliseconds)
      Purge the database. Purge data base.
      Specified by:
      purgeDataBase in class ECaccessServer
      Parameters:
      milliseconds - the milliseconds
    • publishToMQTTBroker

      public void publishToMQTTBroker(String topic, int qos, long expiryInterval, String contentType, String clientId, String payload, boolean retain)
      Publish MQTT message to all transfers servers from all transfer groups.
      Parameters:
      topic - the topic
      qos - the qos
      expiryInterval - the expiry interval
      contentType - the content type
      clientId - the client id
      payload - the payload
      retain - the retain
    • removeFromMQTTBroker

      public void removeFromMQTTBroker(String topic)
      Remove MQTT retain message from all transfers servers from all transfer groups.
      Parameters:
      topic - the topic
    • getMQTTClientsCount

      public int getMQTTClientsCount()
      Get the number of clients connected to all the MQTT brokers.
      Returns:
      the MQTT clients count
    • deleteDataFile

      public boolean deleteDataFile(DataFile file) throws DataBaseException
      Delete data file.
      Parameters:
      file - the file
      Returns:
      true, if successful
      Throws:
      DataBaseException - the data base exception
    • purgeDataFile

      public TransferScheduler.PurgeResult purgeDataFile(DataFile file, String byAndFrom) throws DataBaseException
      Purge data file.
      Parameters:
      file - the file
      byAndFrom - the by and from
      Returns:
      the purge result
      Throws:
      DataBaseException - the data base exception
    • computeFilterEfficiency

      public String computeFilterEfficiency(String destinationName, String email, String filter, long date, boolean includeStdby, String pattern) throws DataBaseException
      Compute the filter efficiency. The result is sent to the specified email address.
      Parameters:
      destinationName - the destination name
      email - the email address
      filter - the filter
      date - the date
      includeStdby - specify if should include Stdby files or not?
      pattern - specify if should include Stdby files or not?
      Returns:
      the filter efficiency
      Throws:
      DataBaseException - the data base exception
    • getMoverReport

      public String getMoverReport(Host proxyHost) throws DataBaseException, IOException
      Gets the mover report.
      Parameters:
      proxyHost - the proxy host
      Returns:
      the mover report
      Throws:
      DataBaseException - the data base exception
      IOException - Signals that an I/O exception has occurred.
    • getHostReport

      public String getHostReport(Host proxyHost, Host host) throws DataBaseException, IOException
      Gets the host report.
      Parameters:
      proxyHost - the proxy host
      host - the host
      Returns:
      the host report
      Throws:
      DataBaseException - the data base exception
      IOException - Signals that an I/O exception has occurred.
    • cleanDataWindow

      public void cleanDataWindow(Host host) throws DataBaseException, IOException
      Clean the Data Window of the selected Host.
      Parameters:
      host - the host
      Throws:
      DataBaseException - the data base exception
      IOException - Signals that an I/O exception has occurred.
    • resetHostStats

      public void resetHostStats(Host host) throws DataBaseException
      Reset the host stats of the selected Host.
      Parameters:
      host - the host
      Throws:
      DataBaseException - the data base exception
    • getReport

      public String getReport(Host host) throws DataBaseException, IOException
      Get a report for the specified Host.
      Parameters:
      host - the host
      Returns:
      the report
      Throws:
      DataBaseException - the data base exception
      IOException - Signals that an I/O exception has occurred.
    • getOutput

      public RemoteInputStreamImp getOutput(Host host) throws IOException
      Get the output for the specified Host. This is used by the monitoring interface.
      Parameters:
      host - the host
      Returns:
      the output
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getReport

      public String getReport(TransferServer server) throws IOException
      Get a report for the specified TransferServer.
      Parameters:
      server - the server
      Returns:
      the report
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • updateIncomingConnectionIds

      public void updateIncomingConnectionIds(String serverName, List<IncomingConnection> incomingConnections)
      Update incoming connection ids. Update incoming connection ids.
      Specified by:
      updateIncomingConnectionIds in interface MasterInterface
      Parameters:
      serverName - the server name
      incomingConnections - the incoming connections
    • getIncomingConnections

      public Map<String,ArrayList<IncomingConnection>> getIncomingConnections() throws DataBaseException
      Get all incoming connections from all data movers per user.
      Returns:
      the incoming connections per user
      Throws:
      DataBaseException - the data base exception
    • getIncomingConnectionIds

      public String getIncomingConnectionIds() throws DataBaseException
      Get all incoming connections from all data movers.
      Returns:
      the incoming connection ids
      Throws:
      DataBaseException - the data base exception
    • closeAllIncomingConnections

      public void closeAllIncomingConnections() throws DataBaseException
      Close all incoming connections from all data movers.
      Throws:
      DataBaseException - the data base exception
    • closeIncomingConnection

      public boolean closeIncomingConnection(String id) throws IOException
      Close an incoming connection from its identifier.
      Parameters:
      id - the id in the format dataMoverName_id
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • closeAllIncomingConnections

      public void closeAllIncomingConnections(String transferServerName) throws IOException
      Close all incoming connections on a data mover.
      Parameters:
      transferServerName - the transfer server name
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • updateTransferStatus

      public boolean updateTransferStatus(DataTransfer transfer, String code) throws MasterException
      Update transfer status.
      Parameters:
      transfer - the transfer
      code - the code
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • updateTransferStatus

      public boolean updateTransferStatus(long id, String code, boolean commit, String username, String byAndFrom, boolean synchronous, boolean reset) throws MasterException
      Update transfer status.
      Parameters:
      id - the id
      code - the code
      commit - the commit
      username - the username
      byAndFrom - the comment
      synchronous - the synchronous
      reset - the reset
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • updateTransferStatus

      public boolean updateTransferStatus(DataTransfer transfer, String code, boolean commit, String username, String byAndFrom, boolean synchronous, boolean reset) throws MasterException
      Update transfer status.
      Parameters:
      transfer - the transfer
      code - the code
      commit - the commit
      username - the username
      byAndFrom - the comment
      synchronous - the synchronous
      reset - the reset
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • reloadDestination

      public boolean reloadDestination(DataTransfer transfer) throws MasterException
      Reload destination.
      Parameters:
      transfer - the transfer
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • getActiveTransferServers

      public List<TransferServer> getActiveTransferServers(String caller, TransferServer original, TransferGroup group, Integer fileSystem) throws DataBaseException
      Get the list of active TransferServers.
      Parameters:
      caller - the caller
      original - the original
      group - the group
      fileSystem - the file system
      Returns:
      the active transfer servers
      Throws:
      DataBaseException - the data base exception
    • transfer

      public long transfer(byte[] bytes, TransferServer server, Host host, String target, long remotePosn, long size) throws MasterException, IOException
      Transfer.
      Parameters:
      bytes - the bytes
      server - the server
      host - the host
      target - the target
      remotePosn - the remote posn
      size - the size
      Returns:
      the long
      Throws:
      MasterException - the master exception
      IOException - Signals that an I/O exception has occurred.
    • getDataMoverInterface

      public MoverInterface getDataMoverInterface(String name)
      Gets the client interface.
      Parameters:
      name - the name
      Returns:
      the client interface
    • resetTransferServer

      public void resetTransferServer(String root, String comment)
      Reset transfer server.
      Parameters:
      root - the root
      comment - the comment
    • resetDestination

      public void resetDestination(Destination destination, String comment)
      Reset destination.
      Parameters:
      destination - the destination
      comment - the comment
    • proxyHostIsAlive

      public long proxyHostIsAlive(String name)
      Proxy host is alive. Called when a ProxyHost sends an update to the Master.
      Specified by:
      proxyHostIsAlive in interface MasterInterface
      Parameters:
      name - the name
      Returns:
      the long
    • addRoot

      public void addRoot(ClientInterface access, String host, String root, String service)
      Adds the root. Adds the root.
      Overrides:
      addRoot in class ECaccessProvider
      Parameters:
      access - the access
      host - the host
      root - the root
      service - the service
    • removeExpired

      public void removeExpired(String root, String service)
      Removes the expired root. Removes the expired.
      Overrides:
      removeExpired in class ECaccessProvider
      Parameters:
      root - the root
      service - the service
    • importECUser

      public ECUser importECUser(String uid) throws EccmdException, RemoteException
      Import ec user. Import EC user.
      Specified by:
      importECUser in class ECaccessServer
      Parameters:
      uid - the user
      Returns:
      the EC user
      Throws:
      EccmdException
      RemoteException
    • handleECuserUpdate

      public void handleECuserUpdate(ECUser ecuser)
      Handle the ECuser update. To be overwritten by classes that wish to do some special processing when a ECuser is updated. Handle E cuser update. This method is called when an ECUser change is detected (when the database has just been updated with a new version from NIS).
      Overrides:
      handleECuserUpdate in class ECaccessServer
      Parameters:
      ecuser - the ecuser
    • getMBeanInfo

      public MBeanInfo getMBeanInfo()
      Gets the MBean info. Gets the MBean info. Gets the MBean info. Gets the MBean info.
      Specified by:
      getMBeanInfo in interface MBeanService
      Overrides:
      getMBeanInfo in class ECaccessServer
      Returns:
      the MBean info
    • getAttribute

      public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException
      Gets the attribute. Gets the attribute. Gets the attribute. Gets the attribute.
      Specified by:
      getAttribute in interface MBeanService
      Overrides:
      getAttribute in class ECaccessServer
      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute
      Throws:
      AttributeNotFoundException - the attribute not found exception
      MBeanException - the MBean exception
    • setAttribute

      public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException
      Sets the attribute. Sets the attribute. Sets the attribute. Sets the attribute.
      Specified by:
      setAttribute in interface MBeanService
      Overrides:
      setAttribute in class ECaccessServer
      Parameters:
      name - the name
      value - the value
      Returns:
      true, if successful
      Throws:
      InvalidAttributeValueException - the invalid attribute value exception
      MBeanException - the MBean exception
    • invoke

      public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException
      Invoke. Invoke. Invoke. Invoke.
      Specified by:
      invoke in interface MBeanService
      Overrides:
      invoke in class ECaccessServer
      Parameters:
      operationName - the operation name
      params - the params
      signature - the signature
      Returns:
      the object
      Throws:
      NoSuchMethodException - the no such method exception
      MBeanException - the MBean exception
    • updateDataTransfers

      public void updateDataTransfers(DataTransfer[] transfers) throws IOException
      Update data transfers. Update data transfers.
      Specified by:
      updateDataTransfers in interface MasterInterface
      Parameters:
      transfers - the transfers
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • updateDownloadProgress

      public DownloadProgress[] updateDownloadProgress(DownloadProgress[] progress) throws IOException
      Update download progress. Update download progress.
      Specified by:
      updateDownloadProgress in interface MasterInterface
      Parameters:
      progress - the progress
      Returns:
      the list of DownloadProgress to interrupt (not found on the MasterServer)
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • checkPendingTicket

      public void checkPendingTicket(DataTransfer transfer, boolean updateRepository)
      Check pending ticket.
      Parameters:
      transfer - the transfer
      updateRepository - the update repository
    • updateDataTransfer

      public void updateDataTransfer(DataTransfer transfer)
      Update data transfer.
      Parameters:
      transfer - the transfer
    • addDataTransfer

      public void addDataTransfer(DataTransfer transfer)
      Adds the data transfer.
      Parameters:
      transfer - the transfer
    • removeDataTransfer

      public void removeDataTransfer(DataTransfer transfer)
      Removes the data transfer.
      Parameters:
      transfer - the transfer
    • removeDataFileAndDataTransfers

      public void removeDataFileAndDataTransfers(DataFile file, String username, String byAndFrom) throws MasterException, DataBaseException
      Removes the data file and data transfers.
      Parameters:
      file - the file
      username - the username
      byAndFrom - the comment
      Throws:
      MasterException - the master exception
      DataBaseException - the data base exception
    • addTransferHistory

      public void addTransferHistory(DataTransfer transfer)
      Adds the transfer history.
      Parameters:
      transfer - the transfer
    • addTransferHistory

      public void addTransferHistory(DataTransfer transfer, String code, String comment)
      Adds the transfer history.
      Parameters:
      transfer - the transfer
      code - the code
      comment - the comment
    • addTransferHistory

      public void addTransferHistory(DataTransfer transfer, Host source, String code, String comment, boolean error)
      Adds the transfer history.
      Parameters:
      transfer - the transfer
      source - source host
      code - the code
      comment - the comment
      error - is it an error?
    • getProgressInterface

      public ProgressInterface getProgressInterface(long dataFileId)
      Gets the progress interface either from the download schedulers or the ecpds plugin (depending on how the data file is retrieved).
      Parameters:
      dataFileId - the data file id
      Returns:
      the progress interface
    • getRetrieved

      public long getRetrieved(long dataFileId)
      Gets the number of bytes retrieved. If the thread is not found on both download schedulers then -1 is returned.
      Parameters:
      dataFileId - the data file id
      Returns:
      the retrieved
    • getTransferServerName

      public String getTransferServerName(long dataFileId)
      Gets the transfer server name.
      Parameters:
      dataFileId - the data file id
      Returns:
      the transfer server name
    • getDataTransferFromCache

      public DataTransfer getDataTransferFromCache(long id)
      Gets the data transfer from cache.
      Parameters:
      id - the id
      Returns:
      the data transfer from cache
    • getStatus

      public String getStatus(String destinationName)
      Gets the status.
      Parameters:
      destinationName - the Destination name
      Returns:
      the status
    • getDataTransfers

      public DataTransfer[] getDataTransfers(String destinationName)
      Gets the data transfers.
      Parameters:
      destinationName - the destination name
      Returns:
      the data transfers
    • getDataTransfer

      public DataTransfer getDataTransfer(long id)
      Gets the data transfer.
      Parameters:
      id - the id
      Returns:
      the data transfer
    • getDataTransfer

      public DataTransfer getDataTransfer(DataTransfer transfer)
      Gets the data transfer.
      Parameters:
      transfer - the transfer
      Returns:
      the data transfer
    • sendECpdsMessage

      public void sendECpdsMessage(DataTransfer transfer)
      Sends the ecpds message.
      Parameters:
      transfer - the transfer
    • sendECpdsMessage

      public void sendECpdsMessage(String from, String to, String cc, String subject, String content, String attachmentName, String attachmentContent)
      Sends the ecpds message.
      Parameters:
      from - the from
      to - the to
      cc - the cc
      subject - the subject
      content - the content
      attachmentName - the attachment name
      attachmentContent - the attachment content
    • sendECpdsMessage

      public void sendECpdsMessage(String to, String subject, String content)
      Sends the ecpds message.
      Parameters:
      to - the to
      subject - the subject
      content - the content
    • isAvailable

      public long isAvailable()
      Checks if it is available. Checks if is available.
      Specified by:
      isAvailable in interface ProviderInterface
      Returns:
      the long
    • updateData

      public void updateData(Host host) throws DataBaseException
      Update data. Update data. This method is used from the MoverProvider on the MoverServer (updateMSUser) to update the Host. The method will make sure the Host was not updated by a newer version. If a newer version exists then this update will not be done. The only field updated in this method is the DATA.
      Specified by:
      updateData in interface MasterInterface
      Parameters:
      host - the host
      Throws:
      DataBaseException - the data base exception
    • updateData

      public void updateData(String hostId, String data) throws DataBaseException
      Update data. Update data. This method is used from the MoverProvider on the MoverServer (updateMSUser) to update the Host. The method will make sure the Host was not updated by a newer version. If a newer version exists then this update will not be done. The only field updated in this method is the DATA.
      Specified by:
      updateData in interface MasterInterface
      Parameters:
      hostId - the host id
      data - the host data
      Throws:
      DataBaseException - the data base exception
    • updateLocation

      public void updateLocation(Host host)
      Update location. Update location. This method is used from the MoverProvider on the MoverServer (getMSUser) to update the Host location. This is triggered when the MoverServer has detected a change in the IP address. It is also called from the Web monitoring and JMX interface.
      Specified by:
      updateLocation in interface MasterInterface
      Parameters:
      host - the host
    • updateHostLocations

      public int updateHostLocations()
      This method is updating the locations for every Host in the database (called from the JMX interface).
      Returns:
      the int
    • getECauthToken

      public ECauthToken getECauthToken(String user) throws IOException
      Gets the ecauth token. Gets the ecauth token.
      Specified by:
      getECauthToken in interface MasterInterface
      Parameters:
      user - the user
      Returns:
      the ecauth token
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getETag

      public String getETag(long dataTransferId) throws IOException
      Gets the ETag for a given dataTransferId. Gets the e tag.
      Specified by:
      getETag in interface MasterInterface
      Parameters:
      dataTransferId - the data transfer id
      Returns:
      the ETag
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • copyHost

      public Host copyHost(String destinationName, String hostName) throws DataBaseException
      Copy a Host within the same Destination.
      Parameters:
      destinationName - the destination name
      hostName - the host name
      Returns:
      the host
      Throws:
      DataBaseException - the data base exception
    • copyDestination

      public Destination copyDestination(String fromDestinationName, String toDestinationName, String comment, boolean copySharedHost) throws MasterException, DataBaseException
      Copy a destination.
      Parameters:
      fromDestinationName - the from destination name
      toDestinationName - the target destination name
      comment - the comment
      copySharedHost - the copy shared host
      Returns:
      the destination
      Throws:
      MasterException - the master exception
      DataBaseException - the data base exception
    • importDestination

      public void importDestination(Destination fromDestination, Association[] linkedAssociations, boolean copySharedHost) throws MasterException, DataBaseException
      Import destination from another Master Server. Import destination.
      Specified by:
      importDestination in interface MasterInterface
      Parameters:
      fromDestination - the from destination
      linkedAssociations - the linked associations
      copySharedHost - the copy shared host
      Throws:
      MasterException - the master exception
      DataBaseException - the data base exception
    • exportDestination

      public void exportDestination(String targetMaster, String fromDestination, boolean copySharedHost) throws MasterException, DataBaseException
      Export destination.
      Parameters:
      targetMaster - the target master in the form host:
      fromDestination - the from destination
      copySharedHost - the copy shared host
      Throws:
      MasterException - the master exception
      DataBaseException - the data base exception
    • updateRemoteTransferStatus

      public boolean updateRemoteTransferStatus(String remoteMaster, boolean standby, String destination, String target, String uniqueKey, String status) throws MasterException
      Update data transfer status to another Master Server.
      Parameters:
      remoteMaster - the remote master
      standby - the standby flag
      destination - the destination name
      target - the target name
      uniqueKey - the unique key
      status - the status
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • updateLocalTransferStatus

      public boolean updateLocalTransferStatus(String remoteMaster, boolean standby, String destination, String target, String uniqueKey, String status) throws MasterException
      Update data transfer status from another Master Server. Update local transfer status.
      Specified by:
      updateLocalTransferStatus in interface MasterInterface
      Parameters:
      remoteMaster - the remote master
      standby - the standby flag
      destination - the destination name
      target - the target name
      uniqueKey - the unique name
      status - the status
      Returns:
      true, if successful
      Throws:
      MasterException - the master exception
    • getWebUser

      public WebUser getWebUser(String user, String credentials, String root) throws MasterException
      Allow getting a Web User. The credentials are checked before returning the Web User.
      Parameters:
      user - the user
      credentials - the credentials
      root - the root
      Returns:
      the web user
      Throws:
      MasterException - the master exception
    • saveWebUser

      public void saveWebUser(WebUser webUser) throws MasterException, DataBaseException
      Creates the web user.
      Parameters:
      webUser - the web user
      Throws:
      MasterException - the master exception
      DataBaseException - the data base exception
    • shutdown

      public void shutdown()
      Shutdown. Shutdown. Shutdown. Shutdown. Shutdown.
      Specified by:
      shutdown in interface ToBeStarted
      Overrides:
      shutdown in class ECaccessProvider
    • handle

      public void handle(PluginEvent<?> event)
      Handle. Handle.
      Specified by:
      handle in interface HandlerInterface
      Overrides:
      handle in class StarterServer
      Parameters:
      event - the event
    • handle

      public void handle(PluginEvent<?>[] events)
      Handle. Handle.
      Specified by:
      handle in interface HandlerInterface
      Overrides:
      handle in class StarterServer
      Parameters:
      events - the events
    • getInitialDataTransferEvents

      public void getInitialDataTransferEvents(String target)
      Submit the initial data transfer events to the handler specified by its target name.
      Parameters:
      target - the target
    • getInitialProductStatusEvents

      public void getInitialProductStatusEvents(String target)
      Submit the initial product status events to the handler specified by its target name.
      Parameters:
      target - the target
    • getInitialChangeHostEvents

      public void getInitialChangeHostEvents(String target)
      Submit the initial change host events to the handler specified by its target name.
      Parameters:
      target - the target
    • getRoot

      public String getRoot()
      Gets the root. Gets the root.
      Specified by:
      getRoot in interface ClientInterface
      Returns:
      the root
    • getService

      public String getService()
      Gets the service. Gets the service.
      Specified by:
      getService in interface ClientInterface
      Returns:
      the service
    • getPassword

      public String getPassword()
      Gets the password. Gets the password.
      Specified by:
      getPassword in interface ClientInterface
      Returns:
      the password
    • updatePluginEvents

      public void updatePluginEvents(PluginEvent<?>[] events) throws Exception
      Update plugin events.
      Parameters:
      events - the events
      Throws:
      Exception - the exception