Matching design pattern for class wrapping?



I am in search of a design pattern which fits my problem. Here's the
situation:

I am writing a socket-server application. This server has multiple
layers: connection, authentication, and interaction. The user
connects, the user authenticates theirself, and the user interacts with
the server.

What I was planning on doing was encapsulating each "state" into a
different object:

Connects - TcpUser
Authenticates - AuthenticationUser (inherits from TcpUser)
Interacts - InteractionUser (inherits from AuthenticationUser)

(ignore the horrible naming - trying to keep it simple ;))

I'm doing this because parent classes needn't know about their
children's functionality (the TcpUser doesn't need to worry about how
it should interact with the server), but children objects can gain
value from their parent's functions. My problem is that the child
classes will be instantiated at later times as the user progresses
through the states of the server; however, they need to refer to
instances of their parent classes created earlier in the program.
Example:

class A {...}
class B implements A {...}

main () {
A classA = new A ();
B classB = classA; //I want to do something like this -
what goes here?
}

If I wrap the parent classes in their children, this would mean I would
have to write wrapper member-functions for every parent function. As
you can imagine, this could quickly get out of control. What I *don't*
want to do:

class A {
string a;
string GetString () { return a;}
}

class B {
A aInstance;
public B (A a) {
aInstance = a;
}

string GetString () { return a.GetString(); }
}

Maybe the solution has nothing to do with patterns and I've just been
thinking about this too long, maybe there's a pattern out there that
fits this problem. Either way, I could use a little friendly advice :)

Jason

.



Relevant Pages

  • Re: AD Sites and Services Question
    ... Tested the set logonserver and it is showing the DC on the remote site. ... I had one old NS record that I deleted for a server that no longer ... Network A exists at my main office ... authenticates with Network A DC's, but continues to go across out T1 ...
    (microsoft.public.windows.server.active_directory)
  • Re: << Trend 594 dat file freeze up on servers and workstations>>
    ... >>>Because the server is totally freezing up, ... >>>not able to get into OfficeScan Console and roll back pattern files. ... Boot server in safe mode ... Boot server to normal mode ...
    (microsoft.public.windows.server.sbs)
  • Re: Have you had good results with Trend Micro support?
    ... One of the clients also has a Server 2003 file server and the pattern file ... I tried uninstalling the TM Client, ...
    (microsoft.public.windows.server.sbs)
  • Re: Have you had good results with Trend Micro support?
    ... server that's not getting the latest pattern file. ... Win2003 server that is outside of the domain on a DMZ that did get its ... I tried uninstalling the TM Client, ...
    (microsoft.public.windows.server.sbs)
  • Re: Have you had good results with Trend Micro support?
    ... Successfully Pattern Update! ... Rolled back to Virus Engine 8.320.1004 via the Dashboard. ... manually uninstall and then reinstall the client. ... The Exchange server is ...
    (microsoft.public.windows.server.sbs)