diff options
Diffstat (limited to 'java/demo/book/evictor_filesystem/NodeInitializer.java')
-rw-r--r-- | java/demo/book/evictor_filesystem/NodeInitializer.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/java/demo/book/evictor_filesystem/NodeInitializer.java b/java/demo/book/evictor_filesystem/NodeInitializer.java new file mode 100644 index 00000000000..b1304afd16e --- /dev/null +++ b/java/demo/book/evictor_filesystem/NodeInitializer.java @@ -0,0 +1,26 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2008 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. +// +// ********************************************************************** + +import Filesystem.*; + +public class NodeInitializer implements Freeze.ServantInitializer +{ + public void + initialize(Ice.ObjectAdapter adapter, Ice.Identity id, String facet, Ice.Object obj) + { + if(obj instanceof FileI) + { + ((FileI)obj)._id = id; + } + else if(obj instanceof DirectoryI) + { + ((DirectoryI)obj)._id = id; + } + } +} |