コード例 #1
0
ファイル: ContainerServices.py プロジェクト: marco-buttu/ACS
    def corbaObjectToString(self, comp_ref): # pragma: NO COVER
        '''
        Converts a CORBA object its string representation.

        Parameters: comp_ref is a reference to the CORBA object.

        Return: the string representation (an IOR)

        Raises: ???
        '''
        return getORB().object_to_string(comp_ref)
コード例 #2
0
ファイル: ContainerServices.py プロジェクト: cvalenzu/ACS
    def corbaObjectToString(self, comp_ref):  # pragma: NO COVER
        '''
        Converts a CORBA object its string representation.

        Parameters: comp_ref is a reference to the CORBA object.

        Return: the string representation (an IOR)

        Raises: ???
        '''
        return getORB().object_to_string(comp_ref)
コード例 #3
0
ファイル: ContainerServices.py プロジェクト: marco-buttu/ACS
    def corbaObjectFromString(self, obj_uri): # pragma: NO COVER
        '''
        Converts a string to a CORBA object reference.
        
        Parameters:
        - obj_uri is the address to the CORBA object

        Return: a CORBA reference to obj_uri

        Raises: ???
        '''
        return getORB().string_to_object(obj_uri)
コード例 #4
0
ファイル: ContainerServices.py プロジェクト: cvalenzu/ACS
    def corbaObjectFromString(self, obj_uri):  # pragma: NO COVER
        '''
        Converts a string to a CORBA object reference.
        
        Parameters:
        - obj_uri is the address to the CORBA object

        Return: a CORBA reference to obj_uri

        Raises: ???
        '''
        return getORB().string_to_object(obj_uri)
コード例 #5
0
 def initCORBA(self):
     '''
     Handles all the CORBA involved in creating a CommonNC.
     
     Parameters: None
     
     Returns: Nothing
     
     Raises: ACSErrTypeCommonImpl.CORBAProblemExImpl on critical failures
     '''
     #Get orb stuff, and name service tree.
     #If any of this fails, must raise an exception because there's absolutely
     #nothing that can be done.
     try:
         self.nt = NameTree.nameTree(getORB())
     except Exception, e:
         print_exc()
         raise CORBAProblemExImpl(nvSeq=[NameValue("channelname",
                                                   self.channelName),
                                         NameValue("exception",
                                                   str(e))])
コード例 #6
0
 def initCORBA(self):
     '''
     Handles all the CORBA involved in creating a CommonNC.
     
     Parameters: None
     
     Returns: Nothing
     
     Raises: ACSErrTypeCommonImpl.CORBAProblemExImpl on critical failures
     '''
     #Get orb stuff, and name service tree.
     #If any of this fails, must raise an exception because there's absolutely
     #nothing that can be done.
     try:
         self.nt = NameTree.nameTree(getORB())
     except Exception, e:
         print_exc()
         raise CORBAProblemExImpl(nvSeq=[
             NameValue("channelname", self.channelName),
             NameValue("exception", str(e))
         ])
コード例 #7
0
    def __init__(self, name="ACS Event Admin Client"):
        '''
        Just call superclass constructors here.
        '''
        PySimpleClient.__init__(self, name)

        #dictionary which consists of all active channels
        #the keys here are the channelNames in string format
        self.channels = {}
        
        #so long as this evaluates to true, the thread continues executing
        self.running = 1

        #start a new thread to continuously look for new channels in the naming
        #service
        self.getLogger().logInfo("Creating a thread to poll the CORBA Naming Service for new channels...")

        #Get the Naming Service helper class
        self.nt = NameTree.nameTree(getORB())
        
        start_new_thread(self.pollNamingService, ())
        return