com.prosysopc.ua.types.opcua.client
Class FileTypeImpl

java.lang.Object
  extended by com.prosysopc.ua.nodes.AbstractUaNode
      extended by com.prosysopc.ua.client.nodes.UaNodeImpl
          extended by com.prosysopc.ua.client.nodes.UaInstanceImpl
              extended by com.prosysopc.ua.client.nodes.UaObjectImpl
                  extended by com.prosysopc.ua.types.opcua.client.BaseObjectTypeImpl
                      extended by com.prosysopc.ua.types.opcua.client.FileTypeImplBase
                          extended by 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.


Field Summary
 
Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addressSpace, references, supportedAttributesMap
 
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)
           
 
Method Summary
 org.opcfoundation.ua.builtintypes.DateTime getTimestamp()
          Get the file's modification time.
 org.opcfoundation.ua.builtintypes.UnsignedInteger open(EnumSet<FileTypeOpenMode> mode)
           
 org.opcfoundation.ua.builtintypes.UnsignedInteger open(FileTypeOpenMode... mode)
           
 org.opcfoundation.ua.builtintypes.UnsignedShort readOpenCount()
           
 org.opcfoundation.ua.builtintypes.UnsignedLong readSize()
           
 org.opcfoundation.ua.builtintypes.DataValue readSizeValue()
           
 Boolean readWritable()
          Whether the file can be written to in general.
 
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.types.opcua.client.BaseObjectTypeImpl
callMethod, callMethodAsync, getComponentId, getQualifiedName
 
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.UaInstanceImpl
getTypeDefinition, getTypeDefinitionId, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId
 
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 class com.prosysopc.ua.nodes.AbstractUaNode
getForwardReferences, getInverseReferences, getReferences, getReferences, getReferencesAsList, referenceTypeInherits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.prosysopc.ua.types.opcua.BaseInstanceType
getQualifiedName
 
Methods inherited from interface com.prosysopc.ua.nodes.UaObject
callMethod, getEventNotifier, getIcon, setEventNotifier, setIcon
 
Methods inherited from interface com.prosysopc.ua.nodes.UaInstance
getTypeDefinition, getTypeDefinitionId, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId
 
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
 

Constructor Detail

FileTypeImpl

public FileTypeImpl(AddressSpace addressSpace,
                    org.opcfoundation.ua.builtintypes.NodeId nodeId,
                    org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                    org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Method Detail

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.