Public Member Functions | |
void | Destroy () |
Destroys the facade and all the concrete objects to the interfaces that have get'ers. | |
NetworkGraphBuilder | GetNetworkGraphBuilder () |
Returns the constructed GraphBuilder object from NetworkAimlFacade's constructor. | |
NetworkAimlFacade (string[] args) | |
Constructs the facade and all the concrete objects to the interfaces that have get'ers. | |
Private Attributes | |
rebecca.impl.NetworkGraphBuilderAIML | graphBuilder |
The GraphBuilder reference. |
NetworkAimlFacade manages the memory for the GraphBuilder object. When NetworkAimlFacade is instantiated it creates the GraphBuilder concrete implementation with a "new" and stores it inside of its reference to the GraphBuilder interface, graphBuilder. When NetworkAimlFacade is destroyed it in turn destroys the GraphBuilder object through this same reference.
This indirection is needed since GraphBuilder is an interface and users cannot directly instantiate it without access to a concrete implementation.
NetworkAimlFacade | ( | string[] | args | ) | [inline] |
Constructs the facade and all the concrete objects to the interfaces that have get'ers.
Underneath the covers the constructor creates a factory and from that factor creates the GraphBuilder concrete representation and stores it in the graphBuilder reference. Pass in your args from your main() to this constructor so it can parse any commands it might want. If you don't have access to your arguments from main() you can "fake" it by passing in a string with the name of your program to args.
args | Pass this from your main() |
NetworkException | If it cannot contact the server upon construction to make the initial connection it will throw a network exception with the message of why it cannot contact the server. | |
Exception | If an underlying method throws an exception, it will be wrapped and thrown as a Exception. |
void Destroy | ( | ) | [inline] |
Destroys the facade and all the concrete objects to the interfaces that have get'ers.
Underneath the covers it removes the GraphBuilder and its respective factory which created it.
NetworkGraphBuilder GetNetworkGraphBuilder | ( | ) | [inline] |
Returns the constructed GraphBuilder object from NetworkAimlFacade's constructor.
No | exceptions will be thrown. |
rebecca.impl.NetworkGraphBuilderAIML graphBuilder [private] |
The GraphBuilder reference.
Use NetworkAimlFacade.getGraphBuilder to obtain a reference to this. The GraphBuilder object is constructed in the constructor of NetworkAimlFacade