summaryrefslogtreecommitdiff
path: root/java/demo/Manual/simple_filesystem/Filesystem
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
committerMatthew Newhook <matthew@zeroc.com>2015-03-18 12:58:16 -0230
commit9b7668c7c92cf9cb311fe444cdddb489cd2a219d (patch)
tree5016567c58c81f5654e9d01935e199c6bf4761d2 /java/demo/Manual/simple_filesystem/Filesystem
parentVS add-in & build updates: (diff)
downloadice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.bz2
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.tar.xz
ice-9b7668c7c92cf9cb311fe444cdddb489cd2a219d.zip
Removed demos.
Moved demoscript to distribution.
Diffstat (limited to 'java/demo/Manual/simple_filesystem/Filesystem')
-rw-r--r--java/demo/Manual/simple_filesystem/Filesystem/DirectoryI.java72
-rw-r--r--java/demo/Manual/simple_filesystem/Filesystem/FileI.java67
2 files changed, 0 insertions, 139 deletions
diff --git a/java/demo/Manual/simple_filesystem/Filesystem/DirectoryI.java b/java/demo/Manual/simple_filesystem/Filesystem/DirectoryI.java
deleted file mode 100644
index 55297f9c878..00000000000
--- a/java/demo/Manual/simple_filesystem/Filesystem/DirectoryI.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-package Filesystem;
-
-public final class DirectoryI extends _DirectoryDisp
-{
- // DirectoryI constructor
-
- public
- DirectoryI(Ice.Communicator communicator, String name, DirectoryI parent)
- {
- _name = name;
- _parent = parent;
-
- // Create an identity. The root directory has the fixed identity "RootDir"
- //
- _id = new Ice.Identity();
- _id.name = _parent != null ? java.util.UUID.randomUUID().toString() : "RootDir";
- }
-
- // Slice Node::name() operation
-
- public String
- name(Ice.Current current)
- {
- return _name;
- }
-
- // Slice Directory::list() operation
-
- public NodePrx[]
- list(Ice.Current current)
- {
- NodePrx[] result = new NodePrx[_contents.size()];
- _contents.toArray(result);
- return result;
- }
-
- // addChild is called by the child in order to add
- // itself to the _contents member of the parent
-
- void
- addChild(NodePrx child)
- {
- _contents.add(child);
- }
-
- // activate adds the servant to the object adapter and
- // adds child nodes ot the parent's _contents list.
-
- public void
- activate(Ice.ObjectAdapter a)
- {
- NodePrx thisNode = NodePrxHelper.uncheckedCast(a.add(this, _id));
- if(_parent != null)
- {
- _parent.addChild(thisNode);
- }
- }
-
- private String _name;
- private DirectoryI _parent;
- private Ice.Identity _id;
- private java.util.List<NodePrx> _contents = new java.util.ArrayList<NodePrx>();
-}
diff --git a/java/demo/Manual/simple_filesystem/Filesystem/FileI.java b/java/demo/Manual/simple_filesystem/Filesystem/FileI.java
deleted file mode 100644
index 540b230ed7c..00000000000
--- a/java/demo/Manual/simple_filesystem/Filesystem/FileI.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-package Filesystem;
-
-public class FileI extends _FileDisp
-{
- // FileI constructor
-
- public
- FileI(Ice.Communicator communicator, String name, DirectoryI parent)
- {
- _name = name;
- _parent = parent;
-
- assert(_parent != null);
-
- //
- // Create an identity
- //
- _id = new Ice.Identity();
- _id.name = java.util.UUID.randomUUID().toString();
- }
-
- // Slice Node::name() operation
-
- public String
- name(Ice.Current current)
- {
- return _name;
- }
-
- // Slice File::read() operation
-
- public String[]
- read(Ice.Current current)
- {
- return _lines;
- }
-
- // Slice File::write() operation
-
- public void
- write(String[] text, Ice.Current current)
- throws GenericError
- {
- _lines = text;
- }
-
- public void
- activate(Ice.ObjectAdapter a)
- {
- NodePrx thisNode = NodePrxHelper.uncheckedCast(a.add(this, _id));
- _parent.addChild(thisNode);
- }
-
- private String _name;
- private DirectoryI _parent;
- private Ice.Identity _id;
- private String[] _lines;
-}