|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.io.DeviceFactory
public abstract class DeviceFactory
The factory creating the output devies for externalized resources.
To declare and use your own device factory (i.e. to compress returned output streams or
log the device output) declare an init property wings.device.factory
in your web xml.
Example:
<init-param>
<param-name>wings.device.factory</param-name>
<param-value>com.mycompany.MyDeviceFactory</param-value>
</init-param>
| Constructor Summary | |
|---|---|
DeviceFactory()
|
|
| Method Summary | |
|---|---|
protected abstract Device |
create(ExternalizedResource externalizedResource)
|
static Device |
createDevice(ExternalizedResource externalizedResource)
Creates a output device for the passed resource using the current device factory. |
static DeviceFactory |
getDeviceFactory()
Returns or lazily creates the current device factory. |
static void |
setDeviceFactory(DeviceFactory factory)
Overrides the current device factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeviceFactory()
| Method Detail |
|---|
public static void setDeviceFactory(DeviceFactory factory)
public static DeviceFactory getDeviceFactory()
setDeviceFactory(DeviceFactory) or
an web.xml init property wings.device.factory to declare an alternative deivce factory.
public static Device createDevice(ExternalizedResource externalizedResource)
throws IOException
externalizedResource - The resource to ouput.
IOException
protected abstract Device create(ExternalizedResource externalizedResource)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||