1 // Copyright 2003-2004 DigitalCraftsmen - http://www.digitalcraftsmen.com.br/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ManagementExtensions
20 /// Summary description for MRegistry.
22 public interface MRegistry
25 /// Registers the specified managed object instance.
27 /// <param name="instance"></param>
28 /// <param name="name"></param>
29 /// <returns></returns>
30 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
31 ManagedInstance
RegisterManagedObject(Object instance
, ManagedObjectName name
);
34 /// Returns a <see cref="ManagedInstance"/> representing
35 /// a managed object instance.
37 /// <param name="name"></param>
38 /// <returns></returns>
39 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
40 ManagedInstance
GetManagedInstance(ManagedObjectName name
);
43 /// Unregister a managed object from the domain.
45 /// <param name="name"></param>
46 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
47 void UnregisterManagedObject(ManagedObjectName name
);
49 bool Contains(ManagedObjectName name
);
56 Object
this [ManagedObjectName name
]
62 /// Invokes an action in managed object
64 /// <param name="name"></param>
65 /// <param name="action"></param>
66 /// <param name="args"></param>
67 /// <param name="signature"></param>
68 /// <returns></returns>
69 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
70 Object
Invoke(ManagedObjectName name
, String action
, Object
[] args
, Type
[] signature
);
73 /// Returns the info (attributes and operations) about the specified object.
75 /// <param name="name"></param>
76 /// <returns></returns>
77 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
78 ManagementInfo
GetManagementInfo(ManagedObjectName name
);
81 /// Gets an attribute value of the specified managed object.
83 /// <param name="name"></param>
84 /// <param name="attributeName"></param>
85 /// <returns></returns>
86 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
87 Object
GetAttributeValue(ManagedObjectName name
, String attributeName
);
90 /// Sets an attribute value of the specified managed object.
92 /// <param name="name"></param>
93 /// <param name="attributeName"></param>
94 /// <param name="attributeValue"></param>
95 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
96 void SetAttributeValue(ManagedObjectName name
, String attributeName
, Object attributeValue
);
99 /// Returns an array of registered domains.
101 /// <returns>a list of domains</returns>
102 String
[] GetDomains();
105 /// Queries the registerd components.
107 /// <returns></returns>
108 ManagedObjectName
[] Query(ManagedObjectName query
);