FileDocCategorySizeDatePackage
_ServerManagerStub.javaAPI DocJava SE 6 API25964Tue Jun 10 01:46:36 BST 2008com.sun.corba.se.PortableActivationIDL

_ServerManagerStub

public class _ServerManagerStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.PortableActivationIDL.ServerManager
Interface used to combine the Activator and Locator when both are implemented together in the same process, as is currently the case for our implementation.

Fields Summary
private static String[]
__ids
Constructors Summary
Methods Summary
public java.lang.String[]_ids()


     
  
    return (String[])__ids.clone ();
  
public voidactivate(java.lang.String serverId)
If the server is not running, start it up. This is allowed whether or not the server has been installed.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("activate", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyActive:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyActiveHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                activate (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
public java.lang.String[]getActiveServers()
list active servers

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("getActiveServers", true);
                $in = _invoke ($out);
                String $result[] = com.sun.corba.se.PortableActivationIDL.ServerIdsHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return getActiveServers (        );
            } finally {
                _releaseReply ($in);
            }
  
public intgetEndpoint(java.lang.String endPointType)
get the port for the endpoint of the locator

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("getEndpoint", true);
                $out.write_string (endPointType);
                $in = _invoke ($out);
                int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return getEndpoint (endPointType        );
            } finally {
                _releaseReply ($in);
            }
  
public java.lang.String[]getORBNames(java.lang.String serverId)
list all registered ORBs for a server

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("getORBNames", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                String $result[] = com.sun.corba.se.PortableActivationIDL.ORBidListHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return getORBNames (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
public intgetServerPortForType(com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB location, java.lang.String endPointType)
Useful from external BadServerIdHandlers which need to pick a particular port type.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("getServerPortForType", true);
                com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.write ($out, location);
                $out.write_string (endPointType);
                $in = _invoke ($out);
                int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return getServerPortForType (location, endPointType        );
            } finally {
                _releaseReply ($in);
            }
  
public voidinstall(java.lang.String serverId)
Invoke the server install hook. If the server is not currently running, this method will activate it.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("install", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyInstalled:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalledHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                install (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypelocateServer(java.lang.String serverId, java.lang.String endPoint)
locate server - returns the port with a specific type for all registered ORBs of an active server. Starts the server if it is not already running.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("locateServer", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $out.write_string (endPoint);
                $in = _invoke ($out);
                com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypeHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return locateServer (serverId, endPoint        );
            } finally {
                _releaseReply ($in);
            }
  
public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBlocateServerForORB(java.lang.String serverId, java.lang.String orbId)
locate server - returns all ports registered with a specified ORB for an active server Starts the server if it is not already running.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("locateServerForORB", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId);
                $in = _invoke ($out);
                com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/InvalidORBid:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return locateServerForORB (serverId, orbId        );
            } finally {
                _releaseReply ($in);
            }
  
public org.omg.PortableInterceptor.ObjectReferenceTemplatelookupPOATemplate(java.lang.String serverId, java.lang.String orbId, java.lang.String[] orbAdapterName)
Find the server template that corresponds to the ORBD's adapter id.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("lookupPOATemplate", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId);
                org.omg.PortableInterceptor.AdapterNameHelper.write ($out, orbAdapterName);
                $in = _invoke ($out);
                org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return lookupPOATemplate (serverId, orbId, orbAdapterName        );
            } finally {
                _releaseReply ($in);
            }
  
public voidpoaDestroyed(java.lang.String serverId, java.lang.String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate)
Called whenever a POA is destroyed.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("poaDestroyed", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId);
                org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                poaDestroyed (serverId, orbId, poaTemplate        );
            } finally {
                _releaseReply ($in);
            }
  
private voidreadObject(java.io.ObjectInputStream s)

     String str = s.readUTF ();
     String[] args = null;
     java.util.Properties props = null;
     org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
     _set_delegate (delegate);
  
public voidregisterORB(java.lang.String serverId, java.lang.String orbId, com.sun.corba.se.PortableActivationIDL.ORBProxy orb, com.sun.corba.se.PortableActivationIDL.EndPointInfo[] endPointInfo)
Called whenever an ORB instance is created. This registers the transport endpoints and the ORB proxy callback object. Note that we cannot detect when an ORB shuts down, although all of the POA shutdowns should still be reported.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("registerORB", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId);
                com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.write ($out, orb);
                com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.write ($out, endPointInfo);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ORBAlreadyRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegisteredHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                registerORB (serverId, orbId, orb, endPointInfo        );
            } finally {
                _releaseReply ($in);
            }
  
public org.omg.PortableInterceptor.ObjectReferenceTemplateregisterPOA(java.lang.String serverId, java.lang.String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate)
Construct or find an ORBD object template corresponding to the server's object template and return it. Called whenever a persistent POA is created.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("registerPOA", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId);
                org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate);
                $in = _invoke ($out);
                org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in);
                return $result;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                return registerPOA (serverId, orbId, poaTemplate        );
            } finally {
                _releaseReply ($in);
            }
  
public voidregisterServer(java.lang.String serverId, com.sun.corba.se.PortableActivationIDL.ServerProxy serverObj)
A new ORB started server registers itself with the Activator

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("registerServer", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.write ($out, serverObj);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                registerServer (serverId, serverObj        );
            } finally {
                _releaseReply ($in);
            }
  
public voidserverGoingDown(java.lang.String serverId)
A server is shutting down that was started by this activator. Complete termination of the server is detected by the death of the process implementing the server.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("serverGoingDown", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                serverGoingDown (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
public voidshutdown(java.lang.String serverId)
If the server is running, shut it down

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotActive:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotActiveHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                shutdown (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
public voiduninstall(java.lang.String serverId)
Invoke the server uninstall hook. If the server is not currently running, this method will activate it. After this hook completes, the server may still be running.

            org.omg.CORBA.portable.InputStream $in = null;
            try {
                org.omg.CORBA.portable.OutputStream $out = _request ("uninstall", true);
                org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId);
                $in = _invoke ($out);
                return;
            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
                $in = $ex.getInputStream ();
                String _id = $ex.getId ();
                if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in);
                else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyUninstalled:1.0"))
                    throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.read ($in);
                else
                    throw new org.omg.CORBA.MARSHAL (_id);
            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
                uninstall (serverId        );
            } finally {
                _releaseReply ($in);
            }
  
private voidwriteObject(java.io.ObjectOutputStream s)

     String[] args = null;
     java.util.Properties props = null;
     String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
     s.writeUTF (str);