Package org.openscada.opc.lib.da.browser
Class TreeBrowser
java.lang.Object
org.openscada.opc.lib.da.browser.BaseBrowser
org.openscada.opc.lib.da.browser.TreeBrowser
Browse through the hierarchical server namespace.
The operations on the address space browser browser are not synchronized as is the TreeBrowser itself. The user must take care of preventing simultanious access to this instance and the server address space browser.
The operations on the address space browser browser are not synchronized as is the TreeBrowser itself. The user must take care of preventing simultanious access to this instance and the server address space browser.
- Author:
- Jens Reimann jens.reimann@th4-systems.com
-
Field Summary
Fields inherited from class org.openscada.opc.lib.da.browser.BaseBrowser
_batchSize, _browser -
Constructor Summary
ConstructorsConstructorDescriptionTreeBrowser(OPCBrowseServerAddressSpace browser) Browse for all items without search parameters.TreeBrowser(OPCBrowseServerAddressSpace browser, String filterCriteria, EnumSet<Access> accessMask, int variantType) Browse for items with search parameters. -
Method Summary
Modifier and TypeMethodDescriptionbrowse()Browse through all levels of the tree browser.protected voidBrowse the root branch for its sub-branches.protected voidbrowseBranches(Branch branch, boolean leaves, boolean descend) Browse the root branch for this leaves.protected voidbrowseLeaves(Branch branch) Fill the branch object with the leaves of this currently selected branch.voidFill the leaves and branches of the branch provided branches including alls sub-branches.voidfillBranches(Branch branch) Fill the branch list of the provided branch.voidfillLeaves(Branch branch) Fill the leaf list of the provided branch.protected voidmoveToBranch(Branch branch) Move the tree browser to a branchprotected voidMove the tree browser to the root folderMethods inherited from class org.openscada.opc.lib.da.browser.BaseBrowser
browse, getAccessPaths, getBatchSize, setBatchSize
-
Constructor Details
-
TreeBrowser
Browse for all items without search parameters.
This will actually call:
TreeBrowser ( browser, "", EnumSet.noneOf ( Access.class ), JIVariant.VT_EMPTY );- Parameters:
browser- The browser to use for browsing
-
TreeBrowser
public TreeBrowser(OPCBrowseServerAddressSpace browser, String filterCriteria, EnumSet<Access> accessMask, int variantType) Browse for items with search parameters.- Parameters:
browser- The browser to usefilterCriteria- The filter criteria. It is specific to the server you use.accessMask- The access mask (useEnumSet.noneOf ( Access.class )for all)variantType- The variant type (useJIVariant.VT_EMPTYfor all)
-
-
Method Details
-
moveToRoot
protected void moveToRoot() throws org.jinterop.dcom.common.JIExceptionMove the tree browser to the root folder- Throws:
org.jinterop.dcom.common.JIException
-
moveToBranch
Move the tree browser to a branch- Parameters:
branch- The branch to move to- Throws:
org.jinterop.dcom.common.JIException
-
browseBranches
public Branch browseBranches() throws org.jinterop.dcom.common.JIException, IllegalArgumentException, UnknownHostExceptionBrowse the root branch for its sub-branches.- Returns:
- The list of sub branches
- Throws:
org.jinterop.dcom.common.JIExceptionIllegalArgumentExceptionUnknownHostException
-
browseLeaves
public Branch browseLeaves() throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIExceptionBrowse the root branch for this leaves.- Returns:
- The list of leaves
- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
fillBranches
public void fillBranches(Branch branch) throws org.jinterop.dcom.common.JIException, IllegalArgumentException, UnknownHostException Fill the branch list of the provided branch.- Parameters:
branch- The branch to fill.- Throws:
org.jinterop.dcom.common.JIExceptionIllegalArgumentExceptionUnknownHostException
-
fillLeaves
public void fillLeaves(Branch branch) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Fill the leaf list of the provided branch.- Parameters:
branch- The branch to fill.- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
browse
public Branch browse() throws org.jinterop.dcom.common.JIException, IllegalArgumentException, UnknownHostExceptionBrowse through all levels of the tree browser.- Returns:
- The whole expanded server address space
- Throws:
org.jinterop.dcom.common.JIExceptionIllegalArgumentExceptionUnknownHostException
-
fill
public void fill(Branch branch) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Fill the leaves and branches of the branch provided branches including alls sub-branches.- Parameters:
branch- The branch to fill.- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
browseLeaves
protected void browseLeaves(Branch branch) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException Fill the branch object with the leaves of this currently selected branch.
The server object is not located to the branch before browsing!- Parameters:
branch- The branch to fill- Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
browseBranches
protected void browseBranches(Branch branch, boolean leaves, boolean descend) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException - Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-
browse
protected void browse(Branch branch, boolean leaves, boolean branches, boolean descend) throws IllegalArgumentException, UnknownHostException, org.jinterop.dcom.common.JIException - Throws:
IllegalArgumentExceptionUnknownHostExceptionorg.jinterop.dcom.common.JIException
-