javax.print.attribute.standard
Class Destination

java.lang.Object
  extended by javax.print.attribute.URISyntax
      extended by javax.print.attribute.standard.Destination
All Implemented Interfaces:
Serializable, Cloneable, Attribute, PrintJobAttribute, PrintRequestAttribute

public final class Destination
extends URISyntax
implements PrintJobAttribute, PrintRequestAttribute

The Destination attribute provides a URI for an alternate destination of the printing output.

As not an IPP attribute many print services will not support this attribute and only provide the printer device as a destination. An alternate output destination would be a file on the local harddisk given as a file scheme URI.

If a print service does not support the destination attributes URI it will throw a PrintException. This exception may further implement the interface URIException.

IPP Compatibility: Destination is not an IPP 1.1 attribute.

See Also:
PrintException, URIException, Serialized Form

Constructor Summary
Destination(URI uri)
          Constructs a Destination object.
 
Method Summary
 boolean equals(Object obj)
          Tests if the given object is equal to this object.
 Class<? extends Attribute> getCategory()
          Returns category of this class.
 String getName()
          Returns the name of this attribute.
 
Methods inherited from class javax.print.attribute.URISyntax
getURI, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Destination

public Destination(URI uri)
Constructs a Destination object.

Parameters:
uri - the URI of the output destination.
Throws:
NullPointerException - if the given uri is null.
Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object.

Overrides:
equals in class URISyntax
Parameters:
obj - the object to test
Returns:
true if both objects are equal, false otherwise.
See Also:
Object.hashCode()

getCategory

public Class<? extends Attribute> getCategory()
Returns category of this class.

Specified by:
getCategory in interface Attribute
Returns:
The class Destination itself.

getName

public String getName()
Returns the name of this attribute.

Specified by:
getName in interface Attribute
Returns:
The name "spool-data-destination"