Added generalized installation capabilities to Windsor (analogous to Kernel registration)
[castle.git] / Tools / ManagedExtensions / ManagementExtensions / MServer.cs
blobc3444dd283983ef61c211da2e75799b54787ad93
1 // Copyright 2003-2004 DigitalCraftsmen - http://www.digitalcraftsmen.com.br/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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
17 using System;
19 /// <summary>
20 /// Summary description for MServer.
21 /// </summary>
22 public interface MServer : MServerConnection
24 /// <summary>
25 /// Instantiates the specified type using the server domain.
26 /// </summary>
27 /// <param name="typeName"></param>
28 /// <returns></returns>
29 Object Instantiate(String typeName);
31 /// <summary>
32 /// Instantiates the specified type using the server domain.
33 /// </summary>
34 /// <param name="typeName"></param>
35 /// <param name="typeName"></param>
36 /// <returns></returns>
37 Object Instantiate(String assemblyName, String typeName);
39 /// <summary>
40 /// Instantiates the specified managed object.
41 /// </summary>
42 /// <param name="typeName"></param>
43 /// <param name="name"></param>
44 /// <returns></returns>
45 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
46 ManagedInstance CreateManagedObject(String typeName, ManagedObjectName name);
48 /// <summary>
49 /// Instantiates the specified managed object.
50 /// </summary>
51 /// <param name="typeName"></param>
52 /// <param name="name"></param>
53 /// <returns></returns>
54 ManagedInstance CreateManagedObject(String assemblyName, String typeName, ManagedObjectName name);
56 /// <summary>
57 /// Registers the specified managed object instance.
58 /// </summary>
59 /// <param name="instance"></param>
60 /// <param name="name"></param>
61 /// <returns></returns>
62 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
63 ManagedInstance RegisterManagedObject(Object instance, ManagedObjectName name);
65 /// <summary>
66 /// Returns a <see cref="ManagedInstance"/> representing
67 /// a managed object instance.
68 /// </summary>
69 /// <param name="name"></param>
70 /// <returns></returns>
71 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
72 ManagedInstance GetManagedInstance(ManagedObjectName name);
74 /// <summary>
75 /// Unregister a managed object from the domain.
76 /// </summary>
77 /// <param name="name"></param>
78 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
79 void UnregisterManagedObject(ManagedObjectName name);
81 /// <summary>
82 /// Invokes an action in managed object
83 /// </summary>
84 /// <param name="name"></param>
85 /// <param name="action"></param>
86 /// <param name="args"></param>
87 /// <param name="signature"></param>
88 /// <returns></returns>
89 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
90 Object Invoke(ManagedObjectName name, String action, Object[] args, Type[] signature);
92 /// <summary>
93 /// Returns the info (attributes and operations) about the specified object.
94 /// </summary>
95 /// <param name="name"></param>
96 /// <returns></returns>
97 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
98 ManagementInfo GetManagementInfo(ManagedObjectName name);
100 /// <summary>
101 /// Gets an attribute value of the specified managed object.
102 /// </summary>
103 /// <param name="name"></param>
104 /// <param name="attributeName"></param>
105 /// <returns></returns>
106 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
107 Object GetAttribute(ManagedObjectName name, String attributeName);
109 /// <summary>
110 /// Sets an attribute value of the specified managed object.
111 /// </summary>
112 /// <param name="name"></param>
113 /// <param name="attributeName"></param>
114 /// <param name="attributeValue"></param>
115 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
116 void SetAttribute(ManagedObjectName name, String attributeName, Object attributeValue);
118 /// <summary>
119 /// Returns an array of registered domains.
120 /// </summary>
121 /// <returns>a list of domains</returns>
122 // String[] GetDomains();
124 /// <summary>
125 /// Queries the registerd components.
126 /// </summary>
127 /// <returns></returns>
128 ManagedObjectName[] Query(ManagedObjectName query);