001: /*
002: * Copyright (C) The MX4J Contributors.
003: * All rights reserved.
004: *
005: * This software is distributed under the terms of the MX4J License version 1.0.
006: * See the terms of the MX4J License in the documentation provided with this software.
007: */
008:
009: package javax.management.remote.rmi;
010:
011: import java.io.IOException;
012: import java.rmi.MarshalledObject;
013: import java.rmi.Remote;
014: import java.util.Set;
015: import javax.management.AttributeList;
016: import javax.management.AttributeNotFoundException;
017: import javax.management.InstanceAlreadyExistsException;
018: import javax.management.InstanceNotFoundException;
019: import javax.management.IntrospectionException;
020: import javax.management.InvalidAttributeValueException;
021: import javax.management.ListenerNotFoundException;
022: import javax.management.MBeanException;
023: import javax.management.MBeanInfo;
024: import javax.management.MBeanRegistrationException;
025: import javax.management.NotCompliantMBeanException;
026: import javax.management.ObjectInstance;
027: import javax.management.ObjectName;
028: import javax.management.ReflectionException;
029: import javax.management.remote.NotificationResult;
030: import javax.security.auth.Subject;
031:
032: /**
033: * @version $Revision: 1.4 $
034: */
035: public interface RMIConnection extends Remote {
036: public String getConnectionId() throws IOException;
037:
038: public void close() throws IOException;
039:
040: public ObjectInstance createMBean(String className,
041: ObjectName name, Subject delegationSubject)
042: throws ReflectionException, InstanceAlreadyExistsException,
043: MBeanRegistrationException, MBeanException,
044: NotCompliantMBeanException, IOException;
045:
046: public ObjectInstance createMBean(String className,
047: ObjectName name, ObjectName loaderName,
048: Subject delegationSubject) throws ReflectionException,
049: InstanceAlreadyExistsException, MBeanRegistrationException,
050: MBeanException, NotCompliantMBeanException,
051: InstanceNotFoundException, IOException;
052:
053: public ObjectInstance createMBean(String className,
054: ObjectName name, MarshalledObject params,
055: String[] signature, Subject delegationSubject)
056: throws ReflectionException, InstanceAlreadyExistsException,
057: MBeanRegistrationException, MBeanException,
058: NotCompliantMBeanException, IOException;
059:
060: public ObjectInstance createMBean(String className,
061: ObjectName name, ObjectName loaderName,
062: MarshalledObject params, String[] signature,
063: Subject delegationSubject) throws ReflectionException,
064: InstanceAlreadyExistsException, MBeanRegistrationException,
065: MBeanException, NotCompliantMBeanException,
066: InstanceNotFoundException, IOException;
067:
068: public void unregisterMBean(ObjectName name,
069: Subject delegationSubject)
070: throws InstanceNotFoundException,
071: MBeanRegistrationException, IOException;
072:
073: public ObjectInstance getObjectInstance(ObjectName name,
074: Subject delegationSubject)
075: throws InstanceNotFoundException, IOException;
076:
077: public Set queryMBeans(ObjectName name, MarshalledObject query,
078: Subject delegationSubject) throws IOException;
079:
080: public Set queryNames(ObjectName name, MarshalledObject query,
081: Subject delegationSubject) throws IOException;
082:
083: public boolean isRegistered(ObjectName name,
084: Subject delegationSubject) throws IOException;
085:
086: public Integer getMBeanCount(Subject delegationSubject)
087: throws IOException;
088:
089: public Object getAttribute(ObjectName name, String attribute,
090: Subject delegationSubject) throws MBeanException,
091: AttributeNotFoundException, InstanceNotFoundException,
092: ReflectionException, IOException;
093:
094: public AttributeList getAttributes(ObjectName name,
095: String[] attributes, Subject delegationSubject)
096: throws InstanceNotFoundException, ReflectionException,
097: IOException;
098:
099: public void setAttribute(ObjectName name,
100: MarshalledObject attribute, Subject delegationSubject)
101: throws InstanceNotFoundException,
102: AttributeNotFoundException, InvalidAttributeValueException,
103: MBeanException, ReflectionException, IOException;
104:
105: public AttributeList setAttributes(ObjectName name,
106: MarshalledObject attributes, Subject delegationSubject)
107: throws InstanceNotFoundException, ReflectionException,
108: IOException;
109:
110: public Object invoke(ObjectName name, String operationName,
111: MarshalledObject params, String[] signature,
112: Subject delegationSubject)
113: throws InstanceNotFoundException, MBeanException,
114: ReflectionException, IOException;
115:
116: public String getDefaultDomain(Subject delegationSubject)
117: throws IOException;
118:
119: public String[] getDomains(Subject delegationSubject)
120: throws IOException;
121:
122: public MBeanInfo getMBeanInfo(ObjectName name,
123: Subject delegationSubject)
124: throws InstanceNotFoundException, IntrospectionException,
125: ReflectionException, IOException;
126:
127: public boolean isInstanceOf(ObjectName name, String className,
128: Subject delegationSubject)
129: throws InstanceNotFoundException, IOException;
130:
131: public void addNotificationListener(ObjectName name,
132: ObjectName listener, MarshalledObject filter,
133: MarshalledObject handback, Subject delegationSubject)
134: throws InstanceNotFoundException, IOException;
135:
136: public void removeNotificationListener(ObjectName name,
137: ObjectName listener, Subject delegationSubject)
138: throws InstanceNotFoundException,
139: ListenerNotFoundException, IOException;
140:
141: public void removeNotificationListener(ObjectName name,
142: ObjectName listener, MarshalledObject filter,
143: MarshalledObject handback, Subject delegationSubject)
144: throws InstanceNotFoundException,
145: ListenerNotFoundException, IOException;
146:
147: public Integer[] addNotificationListeners(ObjectName[] names,
148: MarshalledObject[] filters, Subject[] delegationSubjects)
149: throws InstanceNotFoundException, IOException;
150:
151: public void removeNotificationListeners(ObjectName name,
152: Integer[] listenerIDs, Subject delegationSubject)
153: throws InstanceNotFoundException,
154: ListenerNotFoundException, IOException;
155:
156: public NotificationResult fetchNotifications(
157: long clientSequenceNumber, int maxNotifications,
158: long timeout) throws IOException;
159: }
|