Interface MasterInterface

All Superinterfaces:
ProviderInterface, Remote
All Known Implementing Classes:
MasterServer

public interface MasterInterface extends ProviderInterface
The Interface MasterInterface.
  • Method Details

    • updateIncomingConnectionIds

      void updateIncomingConnectionIds(String serverName, List<IncomingConnection> incomingConnections) throws RemoteException
      Update incoming connection ids.
      Parameters:
      serverName - the server name
      incomingConnections - the incoming connections
      Throws:
      RemoteException - the remote exception
    • proxyHostIsAlive

      long proxyHostIsAlive(String name) throws RemoteException
      Proxy host is alive.
      Parameters:
      name - the name
      Returns:
      the long
      Throws:
      RemoteException - the remote exception
    • updateDataTransfers

      void updateDataTransfers(DataTransfer[] transfers) throws RemoteException
      Update data transfers.
      Parameters:
      transfers - the transfers
      Throws:
      RemoteException - the remote exception
    • updateDownloadProgress

      DownloadProgress[] updateDownloadProgress(DownloadProgress[] progress) throws RemoteException
      Update download progress.
      Parameters:
      progress - the progress
      Returns:
      the list of DownloadProgress to interrupt (not found on the MasterServer)
      Throws:
      RemoteException - the remote exception
    • updateLiveTransferStatistics

      void updateLiveTransferStatistics(LiveTransferSample[] samples) throws RemoteException
      Update live transfer statistics. Pushed periodically by a DataMover for every active data transfer, so that the MasterServer can feed the "Live ECPDS Earth" globe visualisation (see LiveTransferRegistry). This is a best-effort, fire-and-forget stream: samples may be dropped/ignored (e.g. if no visualisation client is currently connected).
      Parameters:
      samples - the samples
      Throws:
      RemoteException - the remote exception
    • isLiveTransferMonitoringEnabled

      boolean isLiveTransferMonitoringEnabled() throws RemoteException
      Whether the MasterServer currently wants to receive live transfer statistics (e.g. because at least one "Live ECPDS Earth" globe visualisation client is connected). DataMovers should poll this periodically and skip sampling/pushing altogether while it is false, to avoid any overhead when nobody is watching.
      Returns:
      true, if live transfer monitoring is currently wanted
      Throws:
      RemoteException - the remote exception
    • updateData

      void updateData(Host host) throws RemoteException
      Update data.
      Parameters:
      host - the host
      Throws:
      RemoteException - the remote exception
    • updateData

      void updateData(String hostId, String data) throws RemoteException
      Update data.
      Parameters:
      hostId - the host id
      data - the host data
      Throws:
      RemoteException - the remote exception
    • updateLocation

      void updateLocation(Host host) throws RemoteException
      Update location.
      Parameters:
      host - the host
      Throws:
      RemoteException - the remote exception
    • getDataFileAccessInterface

      DataAccessInterface getDataFileAccessInterface() throws RemoteException
      Gets the data file access interface.
      Returns:
      the data file access interface
      Throws:
      RemoteException - the remote exception
    • getDestination

      Destination getDestination(String name) throws RemoteException
      Gets the destination.
      Parameters:
      name - the name
      Returns:
      the destination
      Throws:
      RemoteException - the remote exception
    • isValidDataFile

      boolean isValidDataFile(boolean isProxy, long dataFileId) throws RemoteException
      Checks if is valid data file.
      Parameters:
      isProxy - the is proxy
      dataFileId - the data file id
      Returns:
      true, if is valid data file
      Throws:
      RemoteException - the remote exception
    • getIncomingUserHash

      String getIncomingUserHash(String incomingUser) throws RemoteException
      Return a hash of the specified incoming user (the string is in the form userid:password).
      Parameters:
      incomingUser - the incoming user
      Returns:
      hash, if the user is found
      Throws:
      RemoteException - the remote exception
    • isAnonymousIncomingUser

      boolean isAnonymousIncomingUser(String incomingUser) throws RemoteException
      Check whether an IncomingUser is configured for anonymous (password-free) access.
      Parameters:
      incomingUser - the incoming user name
      Returns:
      true if the user exists and has portal service set to open-access
      Throws:
      RemoteException - the remote exception
    • getIncomingConnectionCount

      int getIncomingConnectionCount(String incomingUser) throws RemoteException
      Get the current number of active connections for the specified incoming user across all data movers and protocols.
      Parameters:
      incomingUser - the incoming user name
      Returns:
      the active connection count
      Throws:
      RemoteException - the remote exception
    • getPortalBytesUsed

      long getPortalBytesUsed(String userId, boolean upload, long windowMs) throws RemoteException
      Returns the total bytes transferred by the given portal user within the specified rolling window.
      Parameters:
      userId - the user id
      upload - true for upload bytes, false for download bytes
      windowMs - the rolling window in milliseconds
      Returns:
      total bytes within the window
      Throws:
      RemoteException - if the call fails
    • getPortalTraffic

      List<PortalTraffic> getPortalTraffic(String userId, int hours) throws RemoteException
      Gets portal traffic statistics. Returns minute-bucket rows for the given user (or all users if userId is empty), covering the specified number of hours back from now.
      Parameters:
      userId - the incoming user ID, or empty string for system-wide
      hours - how many hours of history to return
      Returns:
      list of PortalTraffic rows ordered by time descending
      Throws:
      RemoteException - the remote exception
    • getActiveSystemMessages

      List<SystemMessage> getActiveSystemMessages() throws RemoteException
      Returns the system messages (warning/maintenance banners) currently active, i.e. whose configured start/end window contains the current time. Used to render a banner on the Data Portal (in addition to the Monitor UI's own landing page, which reads directly from the database).
      Returns:
      the list of currently active system messages (empty if none)
      Throws:
      RemoteException - the remote exception
    • getS3AuthorizationSignature

      byte[] getS3AuthorizationSignature(String incomingUser, String prefix, String data, String algorithm) throws RemoteException
      Return a hash of the specified incoming user (the string is in the form userid:password).
      Parameters:
      incomingUser - the incoming user
      prefix - the prefix (e.g. AWS4)
      data - the data
      algorithm - the algorithm
      Returns:
      authorization signature
      Throws:
      RemoteException - the remote exception
    • getIncomingProfile

      IncomingProfile getIncomingProfile(String incomingUser, String incomingPassword, String from) throws RemoteException
      Gets the incoming profile.
      Parameters:
      incomingUser - the incoming user
      incomingPassword - the incoming password
      from - the from
      Returns:
      the incoming profile
      Throws:
      RemoteException - the remote exception
    • getIncomingProfileNoAuth

      IncomingProfile getIncomingProfileNoAuth(String incomingUser) throws RemoteException
      Returns a fresh IncomingProfile for an already-authenticated user without re-running credential validation, TOTP, connection-count checks, or last-login updates.
      Parameters:
      incomingUser - the incoming user id
      Returns:
      the incoming profile
      Throws:
      RemoteException - the remote exception
    • releaseConnectionSlot

      void releaseConnectionSlot(String incomingUser) throws RemoteException
      Releases a pending connection slot for the given user. Must be called when a session closes before being confirmed by the incoming connections poll, to prevent the pending counter from leaking.
      Parameters:
      incomingUser - the incoming user id
      Throws:
      RemoteException - the remote exception
    • getETag

      String getETag(long dataTransferId) throws RemoteException
      Gets the ETag for a given dataTransferId.
      Parameters:
      dataTransferId - the data transfer id
      Returns:
      the ETag
      Throws:
      RemoteException - the remote exception
    • getECauthToken

      ECauthToken getECauthToken(String user) throws RemoteException
      Gets the ecauth token.
      Parameters:
      user - the user
      Returns:
      the ecauth token
      Throws:
      RemoteException - the remote exception
    • importDestination

      void importDestination(Destination fromDestination, Association[] linkedAssociations, boolean copySharedHost) throws RemoteException
      Import destination from another Master Server.
      Parameters:
      fromDestination - the from destination
      linkedAssociations - the linked associations
      copySharedHost - the copy shared host
      Throws:
      RemoteException - the remote exception
    • updateLocalTransferStatus

      boolean updateLocalTransferStatus(String master, boolean standby, String destination, String target, String uniqueName, String status) throws RemoteException
      Update data transfer status from another Master Server.
      Parameters:
      master - the remote master
      standby - the standby flag
      destination - the destination name
      target - the target name
      uniqueName - the unique name
      status - the status
      Returns:
      true, if successful
      Throws:
      RemoteException - the remote exception
    • selfRegisterUser

      String selfRegisterUser(String id, String name, String email, String iso) throws DataBaseException, RemoteException
      Self-register a new data portal user (self-service flow). Creates an inactive IncomingUser with portal_service="self-service", generates a verification token stored in INU_VERIFY_TOKEN, and returns the token so the caller can send a verification email.
      Parameters:
      id - the requested username
      name - the user's full name (stored in comment field)
      email - the user's email address
      iso - ISO 3166-1 alpha-2 country code
      Returns:
      the generated verification token
      Throws:
      DataBaseException - if id already exists or is invalid
      RemoteException - the remote exception
    • verifyRegistrationToken

      String verifyRegistrationToken(String token, boolean autoApprove) throws DataBaseException, RemoteException
      Verify a self-registration token. If autoApprove is true and the token is valid: activates the user, clears the token, generates a random password, and returns "activated:userId:password". If autoApprove is false and the token is valid: marks the email as verified (sets token to "VERIFIED") and returns "verified:userId". Returns "invalid" if the token is not found.
      Parameters:
      token - the verification token from the email link
      autoApprove - whether to activate the account immediately
      Returns:
      status string: "activated:userId:password", "verified:userId", or "invalid"
      Throws:
      DataBaseException - the data base exception
      RemoteException - the remote exception
    • isSubscriberActive

      boolean isSubscriberActive(long psbId) throws RemoteException
      Check whether a specific portal subscriber is still active. This is a lightweight single-row lookup by primary key used on every cookie re-auth to detect deactivated subscribers without a full password re-validation.
      Parameters:
      psbId - the PortalSubscriber primary key
      Returns:
      true if the subscriber exists and PSB_ACTIVE = true
      Throws:
      RemoteException - the remote exception
    • findSubscriberIdByPassword

      long findSubscriberIdByPassword(String inuId, String password) throws RemoteException
      Find the PSB_ID of the active subscriber that matches the given password for the given IncomingUser. Returns -1 if no active subscriber with that password exists (e.g. standard-login or open-access user).
      Parameters:
      inuId - the IncomingUser login
      password - the subscriber password to match
      Returns:
      the subscriber's PSB_ID, or -1 if not found
      Throws:
      RemoteException - the remote exception
    • getPortalSubscriberEmail

      String getPortalSubscriberEmail(long psbId) throws RemoteException
      Get the email address of the portal subscriber with the given PSB_ID. Returns an empty string if the subscriber does not exist or has no email recorded.
      Parameters:
      psbId - the portal subscriber PSB_ID
      Returns:
      the subscriber email, or an empty string if not found
      Throws:
      RemoteException - the remote exception
    • sendNotificationEmail

      void sendNotificationEmail(String to, String subject, String body) throws RemoteException
      Send an email notification via the MasterServer mail infrastructure.
      Parameters:
      to - the recipient email address
      subject - the email subject
      body - the HTML email body
      Throws:
      RemoteException - the remote exception
    • invalidatePortalSessionsForUser

      void invalidatePortalSessionsForUser(String user) throws RemoteException
      Invalidate all portal HTTPS session cookies for the given data user on all movers. Forces the user (and any subscribers) to re-authenticate on their next request. Call this whenever the user's Portal Service mode or password changes.
      Parameters:
      user - the data user login name
      Throws:
      RemoteException - the remote exception
    • resolvePortalSessionAcrossMovers

      String resolvePortalSessionAcrossMovers(String token, String excludeMoverName) throws RemoteException
      Locate a portal session token on any currently connected data mover other than the one named by excludeMoverName. Used for cross-mover session migration after a load-balancer failover so the user does not have to re-authenticate.

      The search iterates all active TransferServer entries and calls MoverInterface.resolvePortalSession(String) on each (in parallel). The first non-null result is returned immediately.

      Parameters:
      token - the portal session token to search for
      excludeMoverName - the name of the calling mover (skipped to avoid a self-lookup round-trip)
      Returns:
      the serialised session entry (user\tsubscriberId\tsubscriberEmail\texpiryEpochMs), or null if not found on any mover
      Throws:
      RemoteException - the remote exception
    • invalidatePortalSessionAcrossMovers

      void invalidatePortalSessionAcrossMovers(String token, String excludeMoverName) throws RemoteException
      Broadcast a portal session token invalidation to all currently connected data movers except the calling one. Used after a user-initiated logout so that any mover that imported the token via cross-mover session migration also evicts it, preventing the user from remaining logged in if a load-balancer routes their next request to a different mover.
      Parameters:
      token - the portal session token to invalidate
      excludeMoverName - the name of the calling mover (already invalidated locally — skipped to avoid a redundant round-trip)
      Throws:
      RemoteException - the remote exception