public class DeviceContext
extends java.lang.Object
The device context is passed to the methods of a device interface. Each shared device has a device interface and a device context associated with it. The device context allows a single device interface to be used for multiple shared devices.
Constructor and Description |
---|
DeviceContext()
DeviceContext constructor.
|
DeviceContext(java.lang.String devName)
Class constructor
|
DeviceContext(java.lang.String devName,
java.lang.String shareName)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
CloseContext()
Close the device context, free any resources allocated by the context
|
org.springframework.extensions.config.ConfigElement |
getConfigurationParameters()
Return the configuration parameters
|
java.lang.String |
getDeviceName()
Return the device name.
|
java.lang.String |
getShareName()
Return the shared device name
|
boolean |
hasConfigurationParameters()
Determine if the device context has any configuration parameters
|
boolean |
isAvailable()
Determine if the filesystem is available
|
void |
setAvailable(boolean avail)
Set the filesystem as available, or not
|
void |
setConfigurationParameters(org.springframework.extensions.config.ConfigElement params)
Set the configuration parameters
|
void |
setDeviceName(java.lang.String name)
Set the device name.
|
void |
setShareName(java.lang.String shareName)
Set the shared device name
|
java.lang.String |
toString()
Return the context as a string
|
public DeviceContext()
public DeviceContext(java.lang.String devName)
devName
- Stringpublic DeviceContext(java.lang.String devName, java.lang.String shareName)
devName
- StringshareName
- Stringpublic final java.lang.String getDeviceName()
public final java.lang.String getShareName()
public final boolean hasConfigurationParameters()
public final boolean isAvailable()
public final org.springframework.extensions.config.ConfigElement getConfigurationParameters()
public final void setAvailable(boolean avail)
avail
- booleanpublic final void setDeviceName(java.lang.String name)
name
- java.lang.Stringpublic final void setShareName(java.lang.String shareName)
shareName
- Stringpublic final void setConfigurationParameters(org.springframework.extensions.config.ConfigElement params)
params
- ConfigElementpublic void CloseContext()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.