Java Doc for CommunityService.java in  » Science » Cougaar12_4 » org » cougaar » core » service » community » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.core.service.community 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.core.service.community.CommunityService

All known Subclasses:   org.cougaar.community.test.CommunityServiceTestImpl,  org.cougaar.community.AbstractCommunityService,  org.cougaar.community.DefaultCommunityServiceImpl,
CommunityService
public interface CommunityService extends Service(Code)
This service provides access to community capabilities.

Most operations are performed asynchronously in which case a callback is used to return status and results. In addition to the asynchronous callback, the getCommunity and searchCommunity methods may also return results immediately if the operation can be completed using locally cached data. In these cases the callback is not invoked. When required, callbacks are always invoked from within a blackboard transaction.



Field Summary
final public static  intAGENT
    
final public static  intCOMMUNITY
    


Method Summary
 voidaddListener(CommunityChangeListener l)
     Add listener for CommunityChangeEvents.
 voidcreateCommunity(String communityName, Attributes attrs, CommunityResponseListener crl)
     Request to create a community.
 voidfindCommunity(String communityName, FindCommunityCallback fccb, long timeout)
     Invokes callback when specified community is found.
Parameters:
  communityName - Name of community
Parameters:
  fccb - Callback invoked after community is found or timeouthas lapsed
Parameters:
  timeout - Length of time (in milliseconds) to wait forcommunity to be located.
 CommunitygetCommunity(String communityName, CommunityResponseListener crl)
     Request to get a Community object.
 String[]getParentCommunities(boolean allLevels)
     Returns an array of community names of all communities of which caller is a member.
Parameters:
  allLevels - Set to false if the list should contain only thosecommunities in which the caller is explicitlyreferenced.
 voidjoinCommunity(String communityName, String entityName, int entityType, Attributes entityAttrs, boolean createIfNotFound, Attributes newCommunityAttrs, CommunityResponseListener crl)
     Request to join a named community.
 voidleaveCommunity(String communityName, String entityName, CommunityResponseListener crl)
     Request to leave named community.
 voidlistAllCommunities(CommunityResponseListener crl)
     Lists all communities in bound in White Pages.
 CollectionlistAllCommunities()
     Lists all communities in Name Server.
 CollectionlistParentCommunities(String member, CommunityResponseListener crl)
     Requests a collection of community names identifying the communities that contain the specified member.
 CollectionlistParentCommunities(String member, String filter, CommunityResponseListener crl)
     Requests a collection of community names identifying the communities that contain the specified member and satisfy a given set of attributes.
 CollectionlistParentCommunities(String member)
     Requests a collection of community names identifying the communities that contain the specified member.
 CollectionlistParentCommunities(String member, String filter)
     Requests a collection of community names identifying the communities that contain the specified member and satisfy a given set of attributes.
 voidmodifyAttributes(String communityName, String entityName, ModificationItem[] mods, CommunityResponseListener crl)
     Request to modify an Entity's attributes.
 voidremoveListener(CommunityChangeListener l)
     Remove listener for CommunityChangeEvents.
 Collectionsearch(String communityName, String filter)
     Performs attribute based search of community entities.
 CollectionsearchCommunity(String communityName, String searchFilter, boolean recursiveSearch, int resultQualifier, CommunityResponseListener crl)
     Initiates a community search operation.

Field Detail
AGENT
final public static int AGENT(Code)



COMMUNITY
final public static int COMMUNITY(Code)





Method Detail
addListener
void addListener(CommunityChangeListener l)(Code)
Add listener for CommunityChangeEvents.
Parameters:
  l - Listener



createCommunity
void createCommunity(String communityName, Attributes attrs, CommunityResponseListener crl)(Code)
Request to create a community. If the specified community does not exist it will be created and the caller will become the community manager. It the community already exists a descriptor is obtained from its community manager and returned in the response.
Parameters:
  communityName - Name of community to create
Parameters:
  attrs - Attributes to associate with new community
Parameters:
  crl - Listener to receive response



findCommunity
void findCommunity(String communityName, FindCommunityCallback fccb, long timeout)(Code)
Invokes callback when specified community is found.
Parameters:
  communityName - Name of community
Parameters:
  fccb - Callback invoked after community is found or timeouthas lapsed
Parameters:
  timeout - Length of time (in milliseconds) to wait forcommunity to be located. A value of -1 disablesthe timeout.



getCommunity
Community getCommunity(String communityName, CommunityResponseListener crl)(Code)
Request to get a Community object. If community is found in local cache a reference is returned by method call. If the community is not found in the cache a null value is returned and the Community object is requested from community's manager. After the Community object has been obtained from the community manager the supplied CommunityResponseListener callback is invoked to notify the requester. Note that the supplied callback is not invoked if a non-null value is returned.
Parameters:
  communityName - Community of interest
Parameters:
  crl - Listener to receive response after remote fetch Community instance if found in cache or null if notfound



getParentCommunities
String[] getParentCommunities(boolean allLevels)(Code)
Returns an array of community names of all communities of which caller is a member.
Parameters:
  allLevels - Set to false if the list should contain only thosecommunities in which the caller is explicitlyreferenced. If true the list will also include thosecommunities in which the caller is implicitly a memberas a result of community nesting. Array of community names
See Also:   CommunityService.listParentCommunities(String,CommunityResponseListener)



joinCommunity
void joinCommunity(String communityName, String entityName, int entityType, Attributes entityAttrs, boolean createIfNotFound, Attributes newCommunityAttrs, CommunityResponseListener crl)(Code)
Request to join a named community. If the specified community does not exist it may be created in which case the caller becomes the community manager. It the community doesn't exist and the caller has set the "createIfNotFound flag to false the join request will be queued until the community is found.
Parameters:
  communityName - Community to join
Parameters:
  entityName - New member name
Parameters:
  entityType - Type of member entity to create (AGENT or COMMUNITY)
Parameters:
  entityAttrs - Attributes for new member
Parameters:
  createIfNotFound - Create community if it doesn't exist
Parameters:
  newCommunityAttrs - Attributes for created community (used ifcreateIfNotFound set to true, otherwise ignored)
Parameters:
  crl - Listener to receive response



leaveCommunity
void leaveCommunity(String communityName, String entityName, CommunityResponseListener crl)(Code)
Request to leave named community.
Parameters:
  communityName - Community to leave
Parameters:
  entityName - Entity to remove from community
Parameters:
  crl - Listener to receive response



listAllCommunities
void listAllCommunities(CommunityResponseListener crl)(Code)
Lists all communities in bound in White Pages. Results are returned in CommunityResponseListener callback. The crl.getContent() method returns a Collection of community names found in white pages.



listAllCommunities
Collection listAllCommunities()(Code)
Lists all communities in Name Server. Collection of community names
See Also:   CommunityService.listAllCommunities(CommunityResponseListener)



listParentCommunities
Collection listParentCommunities(String member, CommunityResponseListener crl)(Code)
Requests a collection of community names identifying the communities that contain the specified member. If the member name is null the immediate parent communities for calling agent are returned. If member is the name of a nested community the names of all immediate parent communities is returned. The results are returned directly if the member name is null or if a copy of the specified community is available in local cache. Otherwise, the results will be returned in the CommunityResponseListener callback in which case the method returns a null value.
Parameters:
  member - Member name
Parameters:
  crl - Listener to receive results if remote lookup is required A collection of community names if operation can be resolved usingdata from local cache, otherwise null



listParentCommunities
Collection listParentCommunities(String member, String filter, CommunityResponseListener crl)(Code)
Requests a collection of community names identifying the communities that contain the specified member and satisfy a given set of attributes. The results are returned directly if the member name is null or if a copy of the specified community is available in local cache. Otherwise, the results will be returned in the CommunityResponseListener callback in which case the method returns a null value.
Parameters:
  member - Member name
Parameters:
  filter - Search filter defining community attributes
Parameters:
  crl - Listener to receive results A collection of community names if operation can be resolved usingdata from local cache, otherwise null



listParentCommunities
Collection listParentCommunities(String member)(Code)
Requests a collection of community names identifying the communities that contain the specified member.
Parameters:
  member - Member name A collection of community names
See Also:   CommunityService.listParentCommunities(String,CommunityResponseListener)



listParentCommunities
Collection listParentCommunities(String member, String filter)(Code)
Requests a collection of community names identifying the communities that contain the specified member and satisfy a given set of attributes.
Parameters:
  member - Member name
Parameters:
  filter - Search filter defining community attributes A collection of community names
See Also:   CommunityService.listParentCommunities(String,String,CommunityResponseListener)



modifyAttributes
void modifyAttributes(String communityName, String entityName, ModificationItem[] mods, CommunityResponseListener crl)(Code)
Request to modify an Entity's attributes.
Parameters:
  communityName - Name of community
Parameters:
  entityName - Name of affected Entity or null if modifyingcommunity attributes
Parameters:
  mods - Attribute modifications
Parameters:
  crl - Listener to receive response



removeListener
void removeListener(CommunityChangeListener l)(Code)
Remove listener for CommunityChangeEvents.
Parameters:
  l - Listener



search
Collection search(String communityName, String filter)(Code)
Performs attribute based search of community entities. This is a general purpose search operation using a JNDI search filter. This method is non-blocking. An empty Collection will be returned if the local cache is empty. Updated search results can be obtained by using the addListener method to receive change notifications.
Parameters:
  communityName - Name of community to search
Parameters:
  filter - JNDI search filter Collection of MessageAddress objects



searchCommunity
Collection searchCommunity(String communityName, String searchFilter, boolean recursiveSearch, int resultQualifier, CommunityResponseListener crl)(Code)
Initiates a community search operation. The serach is performed against the specified community or all communities of the calling agent if the communityName argument is null. The results of the search are immediately returned as part of the method call if the search can be resolved using locally cached data. However, if the search requires interaction with a remote community manager a null value is returned by the method call and the search results are returned via the CommunityResponseListener callback after the remote operation has been completed. In the case where the search can be satisified using local data (i.e., the method returns a non-null value) the CommunityResponseListener is not invoked.
Parameters:
  communityName - Name of community to search or null to globallysearch parent communities of calling agent
Parameters:
  searchFilter - JNDI compliant search filter
Parameters:
  recursiveSearch - True for recursive search into nested communities[false = search top community only]
Parameters:
  resultQualifier - Type of entities to return in result [ALL_ENTITIES,AGENTS_ONLY, or COMMUNITIES_ONLY]
Parameters:
  crl - Callback object to receive search results Collection of Entity objects matching searchcriteria if available in local cache. A null valueis returned if cache doesn't contained namedcommunity.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.