FileDocCategorySizeDatePackage
CallbackClient_DialogImpl.javaAPI DocExample1847Thu Nov 08 00:23:32 GMT 2001com.ora.rmibook.chapter21.printer.applications

CallbackClient_DialogImpl

public class CallbackClient_DialogImpl extends UnicastRemoteObject implements CallbackClient

Fields Summary
private static final String
SUCCESS_WINDOW_TITLE
private static final String
FAILURE_WINDOW_TITLE
private String
_documentName
Constructors Summary
public CallbackClient_DialogImpl(String documentName)

         
        _documentName = documentName;
    
Methods Summary
private voidceaseBeingAServer()

        try {
            unexportObject(this, true);
        } catch (NoSuchObjectException e) {
            // Not much to do. The RMI runtime thinks we're not a server.
        }
    
public voiddocumentFailedToPrint(java.lang.String reason)

        reportResultOfPrintRequest(FAILURE_WINDOW_TITLE, _documentName + " failed to print because " + reason);
    
public voiddocumentIsDone()

        reportResultOfPrintRequest(SUCCESS_WINDOW_TITLE, _documentName + " is done printing.");
        ceaseBeingAServer();
    
private voidreportResultOfPrintRequest(java.lang.String windowTitle, java.lang.String message)

        SwingUtilities.invokeLater(new SendMessageToUser(windowTitle, message));