Java nested and / or child classes
<p>I was wondering what best practices were in java when running a nested class - im thinking of running an rmi server that would be created upon the instanciation of the parent class so, say</p>

<pre><code>class foo() [the 'parent']
constructor for foo() - instanciates rmifoo()
</code></pre>

<p>this get a bit painful when you want to call a method from rmifoo() back in the 'parent' class (you cant simply import the class, because of rmi). one way is of course to make rmifoo() an actual child class, and then be able to access methods in the parent, but this seems needlessly OTT (esp because then, presumably you need to make the parent abstract, etc etc and that really complicates a lot of other functionality).</p>

<p>I was wonder what the best practise is in terms of setting up a system like this, so one can call methods back in the foo() class from within its server ie. rmifoo()</p>

<p><em><strong></em>**</strong><em>update</em><strong>**</strong></p>

<p>Code (as im thinking of it currently) would be somethine like:</p>

<p>A.java:</p>

<pre><code>public class A {
B aBinstance;

  public fooParent() {
  [do something..]
  }
}
</code></pre>

<p>B.Java</p>

<pre><code>public class B { 
  public fooChild() {
   [super].fooParent()  (super wont work...?)
  }
</code></pre>

<p>}</p>
