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)
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)
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))])
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)) ])
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