APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.print

public final Class PrintServiceLookupProvider

extends PrintServiceLookup
implements BackgroundServiceLookup, Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable, sun.print.BackgroundServiceLookup
Imports
java.io.BufferedReader, .IOException, .File, .FileReader, java.net.MalformedURLException, .URL, java.util.ArrayList, .Vector, javax.print.DocFlavor, .MultiDocPrintService, .PrintService, .PrintServiceLookup, javax.print.attribute.Attribute, .AttributeSet, .HashPrintRequestAttributeSet, .HashPrintServiceAttributeSet, .PrintRequestAttribute, .PrintRequestAttributeSet, .PrintServiceAttribute, .PrintServiceAttributeSet, javax.print.attribute.standard.PrinterName, .PrinterURI, java.nio.file.Files, sun.awt.OSInfo, sun.awt.util.ThreadGroupUtils

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private static int
private static final int
private static final int
private static final int
private static final int
pack-priv static final int
pack-priv static final int
pack-priv static int
private static String
private static final int
private String
private PrintService
private Vector<BackgroundLookupListener>
pack-priv String[]
pack-priv String[]
pack-priv String[]
pack-priv String[]
private static int
private static boolean
private PrintService[]
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
private boolean
private PrintService[]
pack-priv static String[]
execCmd(final String command)

private String[]
private String[]
private String[]
pack-priv static int
private String
private String
pack-priv static String
public synchronized PrintService
getDefaultPrintService()

Implements abstract javax.print.PrintServiceLookup.getDefaultPrintService.

Not called directly by applications.

public MultiDocPrintService[]
getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes)

Implements abstract javax.print.PrintServiceLookup.getMultiDocPrintServices.

Not called directly by applications.

private PrintService
private PrintService
private PrintService
private String
public synchronized PrintService[]
getPrintServices()

Implements abstract javax.print.PrintServiceLookup.getPrintServices.

Not called directly by applications.

private PrintService[]
public PrintService[]
getPrintServices(DocFlavor flavor, AttributeSet attributes)

Implements abstract javax.print.PrintServiceLookup.getPrintServices.

Locates services that can be positively confirmed to support the combination of attributes and DocFlavors specified.

private PrintService
public synchronized void
pack-priv static boolean
pack-priv static boolean
pack-priv static boolean
pack-priv static boolean
private boolean
private static URL
newURL(String spec)

public synchronized void
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from javax.print.PrintServiceLookup:
lookupDefaultPrintServicelookupMultiDocPrintServiceslookupPrintServicesregisterServiceregisterServiceProvider

Field Detail

aix_defaultPrinterEnumerationback to summary
private static int aix_defaultPrinterEnumeration
aix_lpstat_dback to summary
private static final int aix_lpstat_d
aix_lpstat_pback to summary
private static final int aix_lpstat_p
aix_lpstat_vback to summary
private static final int aix_lpstat_v
aix_lsallqback to summary
private static final int aix_lsallq
BSD_LPDback to summary
pack-priv static final int BSD_LPD
BSD_LPD_NGback to summary
pack-priv static final int BSD_LPD_NG
cmdIndexback to summary
pack-priv static int cmdIndex
debugPrefixback to summary
private static String debugPrefix
DEFAULT_MINREFRESHback to summary
private static final int DEFAULT_MINREFRESH
defaultPrinterback to summary
private String defaultPrinter
defaultPrintServiceback to summary
private PrintService defaultPrintService
lookupListenersback to summary
private Vector<BackgroundLookupListener> lookupListeners
lpcAllComback to summary
pack-priv String[] lpcAllCom
lpcFirstComback to summary
pack-priv String[] lpcFirstCom
lpcNameComback to summary
pack-priv String[] lpcNameCom
lpNameComAixback to summary
pack-priv String[] lpNameComAix
minRefreshTimeback to summary
private static int minRefreshTime
pollServicesback to summary
private static boolean pollServices
printServicesback to summary
private PrintService[] printServices
UNINITIALIZEDback to summary
pack-priv static final int UNINITIALIZED

Constructor Detail

PrintServiceLookupProviderback to summary
public PrintServiceLookupProvider()

Method Detail

addPrintServiceToListback to summary
private int addPrintServiceToList(ArrayList<PrintService> printerList, PrintService ps)
checkPrinterNameback to summary
private boolean checkPrinterName(String s)
copyOfback to summary
private PrintService[] copyOf(PrintService[] inArr)
execCmdback to summary
pack-priv static String[] execCmd(final String command)
getAllPrinterNamesAIXback to summary
private String[] getAllPrinterNamesAIX()
getAllPrinterNamesBSDback to summary
private String[] getAllPrinterNamesBSD()
getAllPrinterNamesSysVback to summary
private String[] getAllPrinterNamesSysV()
getBSDCommandIndexback to summary
pack-priv static int getBSDCommandIndex()
getDefaultPrinterNameAIXback to summary
private String getDefaultPrinterNameAIX()
getDefaultPrinterNameBSDback to summary
private String getDefaultPrinterNameBSD()
getDefaultPrinterNameSysVback to summary
pack-priv static String getDefaultPrinterNameSysV()
getDefaultPrintServiceback to summary
public synchronized PrintService getDefaultPrintService()

Implements abstract javax.print.PrintServiceLookup.getDefaultPrintService.

Doc from javax.print.PrintServiceLookup.getDefaultPrintService.

Not called directly by applications. Implemented by a service provider, and called by the print lookup service.

Annotations
@Override
getMultiDocPrintServicesback to summary
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes)

Implements abstract javax.print.PrintServiceLookup.getMultiDocPrintServices.

Doc from javax.print.PrintServiceLookup.getMultiDocPrintServices.

Not called directly by applications.

Implemented by a service provider, used by the static methods of this class.

Locates MultiDoc print services which can be positively confirmed to support the combination of attributes and DocFlavors specified.

Annotations
@Override
getNamedPrinterNameAIXback to summary
private PrintService getNamedPrinterNameAIX(String name)
getNamedPrinterNameBSDback to summary
private PrintService getNamedPrinterNameBSD(String name)
getNamedPrinterNameSysVback to summary
private PrintService getNamedPrinterNameSysV(String name)
getPrinterDestNameback to summary
private String getPrinterDestName(PrintService ps)
getPrintServicesback to summary
public synchronized PrintService[] getPrintServices()

Implements abstract javax.print.PrintServiceLookup.getPrintServices.

Doc from javax.print.PrintServiceLookup.getPrintServices.

Not called directly by applications. Implemented by a service provider, used by the static methods of this class.

Annotations
@Override
getPrintServicesback to summary
private PrintService[] getPrintServices(PrintServiceAttributeSet serviceSet)
getPrintServicesback to summary
public PrintService[] getPrintServices(DocFlavor flavor, AttributeSet attributes)

Implements abstract javax.print.PrintServiceLookup.getPrintServices.

Doc from javax.print.PrintServiceLookup.getPrintServices.

Locates services that can be positively confirmed to support the combination of attributes and DocFlavors specified. This method is not called directly by applications.

Implemented by a service provider, used by the static methods of this class.

The results should be the same as obtaining all the PrintServices and querying each one individually on its support for the specified attributes and flavors, but the process can be more efficient by taking advantage of the capabilities of lookup services for the print services.

Annotations
@Override
getServiceByNameback to summary
private PrintService getServiceByName(PrinterName nameAttr)
getServicesInbackgroundback to summary
public synchronized void getServicesInbackground(BackgroundLookupListener listener)

Implements sun.print.BackgroundServiceLookup.getServicesInbackground.

Annotations
@Override
isAIXback to summary
pack-priv static boolean isAIX()
isBSDback to summary
pack-priv static boolean isBSD()
isLinuxback to summary
pack-priv static boolean isLinux()
isMacback to summary
pack-priv static boolean isMac()
matchesAttributesback to summary
private boolean matchesAttributes(PrintService service, PrintServiceAttributeSet attributes)
newURLback to summary
private static URL newURL(String spec) throws MalformedURLException
Annotations
@SuppressWarnings:deprecation
refreshServicesback to summary
public synchronized void refreshServices()
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
sun.print back to summary

private final Class PrintServiceLookupProvider.PrinterChangeListener

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PrinterChangeListenerback to summary
private PrinterChangeListener()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override