|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.adaptors.AbstractAdaptor
com.adventnet.adaptors.corba.CorbaAdaptor
public class CorbaAdaptor
This class acts as a JMX adaptor for IIOP protocol.
It itself acts as a mbean for exposing the Corba properties. This class extends the SimpleAdaptor which provides the implementation of ServiceInfo interface and acts as the Corba server.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.adventnet.adaptors.AbstractAdaptor |
|---|
AbstractAdaptor.ProcessNotification |
| Field Summary | |
|---|---|
(package private) java.lang.String |
classpath
|
(package private) java.lang.String |
cmd
|
static java.lang.String |
factoryName
The CorbaFactory interface NameComponent string with which it is registered immediately to the rootcontext(i.e NameService). |
(package private) java.lang.String |
java_home
|
(package private) java.lang.Process |
p
|
| Fields inherited from class com.adventnet.adaptors.AbstractAdaptor |
|---|
notifications, port, processnotification, state |
| Constructor Summary | |
|---|---|
CorbaAdaptor()
The default constructor for CorbaAdaptor.By default,corba server will be initialized at port 1050. |
|
CorbaAdaptor(int portNo,
javax.management.MBeanServer server)
The two Arg constructor initializes the CorbaAdaptor at the port specified by portNo |
|
| Method Summary | |
|---|---|
void |
addUser(com.adventnet.agent.security.UserContext userContext)
Adds the users specified in the UserContext to the Authentication List of the Adaptor |
void |
bind()
Binds the Corba Adaptor to the Naming Service |
void |
destroyAdaptor()
Allows the service to get stopped. |
void |
enableAuthentication(boolean enable)
Enables Authentication for the RMI Adaptor |
void |
enableAuthorisation(boolean enable)
Enables Authorisation for the RMI Adaptor |
javax.management.ObjectName |
getAdaptorObjectName()
Returns the ObjectName with which the Adaptor is registered with the MBean server |
java.lang.String |
getAdaptorVersion()
Gets the version of the adaptor. |
java.lang.Object |
getAttribute(java.lang.String attribute)
Gets the value of a specific attribute of this MBean. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
Enables the values of several attributes of this MBean. |
javax.management.MBeanInfo |
getMBeanInfo()
This method discovers the attributes and operations this MBean exposes for management. |
java.lang.String |
getObjectName()
Returns the ObjectName of this adaptor with which it has been registered with the MBeanServer. |
java.lang.String |
getPersistentName()
Returns the name of the serialized file in which the User Context details are stored. |
java.lang.String |
getProtocol()
Gets the protocol supported by this adaptor. |
void |
instantiateAdaptor()
Instantiates the Corba Adaptor.By default,Corba Adaptor will be initialized at port 1050 |
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
Invokes an action on the original MBean associated with this MBean. |
void |
postDeregister()
Allows this MBean to perform any operations needed after having been de-registered in the MBeanServer. |
void |
postRegister(java.lang.Boolean registrationDone)
Allows this MBean to perform any operations needed after having been registered in the MBeanServer or after the registration has failed. |
void |
preDeregister()
Allows this MBean to perform any operations it needs before being de-registered by the MBeanServer. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
This method is an implementation of MBeanRegistration interface. |
void |
removeUser(com.adventnet.agent.security.UserContext userContext)
Removes the users specified in the UserContext from the Authenticatio List of the Adaptor |
void |
setAttribute(javax.management.Attribute attribute)
Sets the value of a specific attribute of this MBean. |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Sets the values of several attributes of this MBean. |
void |
setPersistentName(java.lang.String name)
Sets the name of the serialized file in which the User Context details are stored. |
void |
setPort(java.lang.Integer port)
|
void |
unbind()
Unbinds the Corba Adaptor from the Naming Service |
| Methods inherited from class com.adventnet.adaptors.AbstractAdaptor |
|---|
addNotificationListener, changeState, getHost, getNotificationInfo, getPort, getState, getStateInString, handleNotification, isActive, isSecure, processNotification, removeNotificationListener, setPort, startService, stopService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String factoryName
java.lang.Process p
java.lang.String cmd
java.lang.String classpath
java.lang.String java_home
| Constructor Detail |
|---|
public CorbaAdaptor()
public CorbaAdaptor(int portNo,
javax.management.MBeanServer server)
portNo - the port at which the CorbaAdaptor has to be initializedserver - the MBean server to which the adaptor will be registered| Method Detail |
|---|
public void setPort(java.lang.Integer port)
throws java.lang.Exception
java.lang.Exceptionpublic javax.management.ObjectName getAdaptorObjectName()
getAdaptorObjectName in interface AdaptorgetAdaptorObjectName in class AbstractAdaptorpublic void addUser(com.adventnet.agent.security.UserContext userContext)
userContext - the UserContext which has to be addedpublic void removeUser(com.adventnet.agent.security.UserContext userContext)
userContext - the UserContext which has to be removedpublic void setPersistentName(java.lang.String name)
name - name of the Serialized filepublic java.lang.String getPersistentName()
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBean
public java.lang.Object getAttribute(java.lang.String attribute)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanattribute - A String specifying the name of the
attribute to be retrieved.
javax.management.AttributeNotFoundException - The
specified attribute is not accessible in the MBean.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's getter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes in interface javax.management.DynamicMBeanattributes - A list of attributes to be retrieved.
public java.lang.Object invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
invoke in interface javax.management.DynamicMBeanactionName - The name of the action to be invoked.params - An array containing the parameters to be
set when the action is invokedsignature - An array containing the signature of
the action. The class objects will be loaded using the
same class loader as the one used for loading the MBean
on which the action was invoked.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's getter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.
public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanattribute - The identification of the attribute to
be set and the value it is to be set to.
javax.management.AttributeNotFoundException - The
specified attribute is not accessible in the MBean.
javax.management.InvalidAttributeValueException - The
specified value for the attribute is not valid.
javax.management.MBeanException - Wraps an exception
thrown by the MBean's getter.
javax.management.ReflectionException - Wraps an
java.lang.Exception thrown while trying to invoke the setter.public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes in interface javax.management.DynamicMBeanattributes - A list of attributes: The identification
of the attributes to be set and the values they are to be set to.
public void instantiateAdaptor()
instantiateAdaptor in class AbstractAdaptorpublic void bind()
bind in class AbstractAdaptorpublic void unbind()
unbind in class AbstractAdaptor
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
This method is called by the MBeanServer before this mbean getting registered with the server. If the passed objectName is invalid, the returned objectName is taken as valid name to get registered with the server.
The service gets actually started only inside this method at the specified port mentioned in the key "port". If the key "port" is absent, then the service(CORBA) gets started at the default port 1050.
preRegister in interface javax.management.MBeanRegistrationpreRegister in class AbstractAdaptorserver - The MBeanServer in which the MBean will be registered.name - The object name of the MBean.
java.lang.Exception - This exception should be caught by the MBeanServer and
re-thrown as an MBeanRegistrationException.public void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationpostRegister in class AbstractAdaptorregistrationDone - Indicates whether or not the MBean has been successfully
registered in the MBeanServer. The value false means that either the registration phase
has failed.
public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationpreDeregister in class AbstractAdaptorjava.langException - This exception should be caught by the MBeanServer and
re-thrown as an MBeanRegistrationException.
java.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpostDeregister in class AbstractAdaptorpublic void destroyAdaptor()
destroyAdaptor in class AbstractAdaptorpublic java.lang.String getObjectName()
public java.lang.String getAdaptorVersion()
getAdaptorVersion in interface AdaptorgetAdaptorVersion in class AbstractAdaptorpublic java.lang.String getProtocol()
getProtocol in interface AdaptorgetProtocol in class AbstractAdaptor
public void enableAuthorisation(boolean enable)
throws java.lang.UnsupportedOperationException
enableAuthorisation in interface AdaptorenableAuthorisation in class AbstractAdaptorenable - Enables Authorisation if the value is true
java.lang.UnsupportedOperationException - when authorisation is not suppported
public void enableAuthentication(boolean enable)
throws java.lang.UnsupportedOperationException
enableAuthentication in interface AdaptorenableAuthentication in class AbstractAdaptorenable - Enables Authentication if the value is true
java.lang.UnsupportedOperationException - when authentication is not supported
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||