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 MServer.
22 public interface MServer
: MServerConnection
25 /// Instantiates the specified type using the server domain.
27 /// <param name="typeName"></param>
28 /// <returns></returns>
29 Object
Instantiate(String typeName
);
32 /// Instantiates the specified type using the server domain.
34 /// <param name="typeName"></param>
35 /// <param name="typeName"></param>
36 /// <returns></returns>
37 Object
Instantiate(String assemblyName
, String typeName
);
40 /// Instantiates the specified managed object.
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
);
49 /// Instantiates the specified managed object.
51 /// <param name="typeName"></param>
52 /// <param name="name"></param>
53 /// <returns></returns>
54 ManagedInstance
CreateManagedObject(String assemblyName
, String typeName
, ManagedObjectName name
);
57 /// Registers the specified managed object instance.
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
);
66 /// Returns a <see cref="ManagedInstance"/> representing
67 /// a managed object instance.
69 /// <param name="name"></param>
70 /// <returns></returns>
71 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
72 ManagedInstance
GetManagedInstance(ManagedObjectName name
);
75 /// Unregister a managed object from the domain.
77 /// <param name="name"></param>
78 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
79 void UnregisterManagedObject(ManagedObjectName name
);
82 /// Invokes an action in managed object
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
);
93 /// Returns the info (attributes and operations) about the specified object.
95 /// <param name="name"></param>
96 /// <returns></returns>
97 /// <exception cref="InvalidDomainException">If domain name is not found.</exception>
98 ManagementInfo
GetManagementInfo(ManagedObjectName name
);
101 /// Gets an attribute value of the specified managed object.
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
);
110 /// Sets an attribute value of the specified managed object.
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
);
119 /// Returns an array of registered domains.
121 /// <returns>a list of domains</returns>
122 // String[] GetDomains();
125 /// Queries the registerd components.
127 /// <returns></returns>
128 ManagedObjectName
[] Query(ManagedObjectName query
);