Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits
Facade Print E-mail
User Rating: / 0
PoorBest 
Thursday, 20 January 2005 21:21
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.



Source Code

/**
 * Knows which subsystem classes are responsible for a request.
 * Delegates client requests to appropiate susystem objects.
 * @role __Facade
 */
public class Facade {
        /** reference to particular subsystem */
        private SubsystemA theSubsystemA;        /** reference to particular subsystem */
        private SubsystemB theSubsystemB;        /** this method is called by client */
        public void facadeMethod() {
                // multiple subsystems could be involved
                // to provide some functionality
        }
}

/**
 * Implements subsystem functionality. Handles work assigned by the Facade object.
 * Has no knowledge of the facade.
 * @role __System
 */
public class SubsystemA {
        /** some functionality */
        public void subsystemFunctionality() {
        }
}

/**
 * Implements subsystem functionality. Handles work assigned by the Facade object.
 * Has no knowledge of the facade.
 * @role __System
 */
public class SubsystemB {
        /** some functionality */
        public void subsystemFunctionality() {
        }
}

Tags See All Tags Add New Tag...

Please Enter New Tags Separated By Comma's
  Or Close

designpattern  java 
Powered By Joomla Tags

Comments
Add New Search RSS
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:):grin;)8):p:roll:eek:upset:zzz:sigh:?:cry
:(:x
Please input the anti-spam code that you can read in the image.

3.20 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Friday, 17 June 2005 23:33 )
 
Content View Hits : 2895148

Enter Amount: