com.prosysopc.ua.types.opcua.client
Class FileTypeImpl
java.lang.Object
com.prosysopc.ua.nodes.AbstractUaNode
com.prosysopc.ua.client.nodes.UaNodeImpl
com.prosysopc.ua.client.nodes.UaInstanceImpl
com.prosysopc.ua.client.nodes.UaObjectImpl
com.prosysopc.ua.types.opcua.client.BaseObjectTypeImpl
com.prosysopc.ua.types.opcua.client.FileTypeImplBase
com.prosysopc.ua.types.opcua.client.FileTypeImpl
- All Implemented Interfaces:
- UaInstance, UaNode, UaObject, BaseInstanceType, BaseObjectType, FileType
- Direct Known Subclasses:
- AddressSpaceFileTypeImplBase, TrustListTypeImplBase
public class FileTypeImpl
- extends FileTypeImplBase
An object that represents a file that can be accessed via the server.
| Fields inherited from interface com.prosysopc.ua.types.opcua.FileType |
CLOSE, GET_POSITION, MIME_TYPE, OPEN, OPEN_COUNT, READ, SET_POSITION, SIZE, USER_WRITABLE, WRITABLE, WRITE |
|
Constructor Summary |
FileTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
|
| Methods inherited from class com.prosysopc.ua.types.opcua.client.FileTypeImplBase |
close, closeAsync, getCloseNode, getGetPositionNode, getMimeType, getMimeTypeNode, getOpenCount, getOpenCountNode, getOpenNode, getPosition, getPositionAsync, getReadNode, getSetPositionNode, getSize, getSizeNode, getUserWritableNode, getWritableNode, getWriteNode, isUserWritable, isWritable, open, openAsync, read, readAsync, setMimeType, setOpenCount, setPosition, setPositionAsync, setSize, setUserWritable, setWritable, write, writeAsync |
| Methods inherited from class com.prosysopc.ua.client.nodes.UaObjectImpl |
addComponent, call, call, call, callAsync, callAsync, callAsync, callMethod, getAttributes, getAttributes, getEventNotifier, getIcon, getNodeClass, initSupportedAttributes, readAttributeValue, setAttributes, setEventNotifier, setIcon, toString, writeAttributeValue |
| Methods inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl |
addProperties, addProperty, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, assertTypeSupport, assertTypeSupport, beforeAddReference, deleteReference, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, equals, findPlaceholders, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeId, getNodeVersion, getNodeVersionString, getProperties, getProperty, getPropertyValue, getReference, getReferenceList, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hashCode, hasProperty, hasTypeDefinition, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, referenceTypeInherits, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setNodeVersion, setPropertyValue, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute |
| Methods inherited from interface com.prosysopc.ua.nodes.UaNode |
addComponent, addProperty, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeClass, getNodeId, getNodeVersion, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute |
FileTypeImpl
public FileTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
getTimestamp
public org.opcfoundation.ua.builtintypes.DateTime getTimestamp()
throws StatusException
- Get the file's modification time.
- Returns:
- the last modified time of the file as DateTime
- Throws:
StatusException - with Bad_NotFound if the file is not defined or does
not exist
open
public org.opcfoundation.ua.builtintypes.UnsignedInteger open(EnumSet<FileTypeOpenMode> mode)
throws MethodCallStatusException,
ServiceException
- Throws:
MethodCallStatusException
ServiceException
open
public org.opcfoundation.ua.builtintypes.UnsignedInteger open(FileTypeOpenMode... mode)
throws MethodCallStatusException,
ServiceException
- Throws:
MethodCallStatusException
ServiceException
readOpenCount
public org.opcfoundation.ua.builtintypes.UnsignedShort readOpenCount()
throws StatusException
- Returns:
- the number of currently open file handles
- Throws:
StatusException
readSize
public org.opcfoundation.ua.builtintypes.UnsignedLong readSize()
throws StatusException
- Returns:
- the size of the file in bytes, or -1 if the file cannot be read.
- Throws:
StatusException - with Bad_NotFound if the file is not defined or does not exist
readSizeValue
public org.opcfoundation.ua.builtintypes.DataValue readSizeValue()
throws StatusException
- Returns:
- the size as DataValue
- Throws:
StatusException - if reading fails
readWritable
public Boolean readWritable()
throws StatusException
- Whether the file can be written to in general.
- Returns:
- true if the file can be opened for writing by anyone.
- Throws:
StatusException
Copyright © 2018. All rights reserved.