Class RemoteBuilderEndPoint

java.lang.Object
com.iizix.server.AbstractEndPoint
com.iizix.server.run.remote.RemoteBuilderEndPoint
All Implemented Interfaces:
IServerWebSocketCommListener, ITransactionCreator, ITransactionSender, IWSUploaderAcceptor, WebSocketCommListener, IEndPoint, IRootPropTransactionSender

public class RemoteBuilderEndPoint extends AbstractEndPoint implements IWSUploaderAcceptor
End point for the Remote Customized iiziRun Builder that transports a proxy of a RuntimeBuilderProps to build the app.
Author:
Christopher Mindus
  • Method Details

    • processQueuedTransaction

      protected boolean processQueuedTransaction(int code, ReadTransaction trans)
      This method must be implemented in all extending classes.
      Specified by:
      processQueuedTransaction in class AbstractEndPoint
      Parameters:
      code - The transaction code.
      trans - The transaction.
      Returns:
      true if the transaction has been processed, false otherwise.
    • onClientPropsCreated

      protected void onClientPropsCreated(PropCnr root)
      Called when the root is created from a transaction from the client. Override to perform some additional processing such as adding server environment, etc.
      Overrides:
      onClientPropsCreated in class AbstractEndPoint
    • isAccepted

      public boolean isAccepted(HttpServletRequest request)
      Checks if the uploader service would accept this upload request or not.
      Specified by:
      isAccepted in interface IWSUploaderAcceptor
      Parameters:
      request - The request.
      Returns:
      true if accepted, false otherwise.
    • getAlternateAcceptor

      public IWSUploaderAcceptor getAlternateAcceptor(HttpServletRequest request)
      Checks if the service wishes to return an alternate uploader. This can only be done once and the new instance's "getAlternateAcceptor(request)" will not be called.
      Specified by:
      getAlternateAcceptor in interface IWSUploaderAcceptor
      Returns:
      The IWSUploaderAcceptor instance registered for the target URL, or null for default.
    • getUploadDirectory

      public File getUploadDirectory(File defaultDir, List<WSUploadPart> parts)
      Gets the directory where to store the files.
      Specified by:
      getUploadDirectory in interface IWSUploaderAcceptor
      Parameters:
      defaultDir - The default directory where to place the files.
      parts - The parts that would be saved to disk.
      Returns:
      The directory where to store the files, or null to reject the request.
    • onUploaded

      public boolean onUploaded(List<WSUploadPart> parts) throws IOException
      Called when the upload has completed.
      Specified by:
      onUploaded in interface IWSUploaderAcceptor
      Parameters:
      parts - The parts that have been written to disk.
      Returns:
      true To delete the files, false to keep them. If an IOException is thrown, the default is to delete the files!
      Throws:
      IOException - If there are error e.g. reading the files.