Package org.omg.CORBA

Examples of org.omg.CORBA.Object


* @version $Rev: 685898 $ $Date: 2008-08-14 07:02:41 -0700 (Thu, 14 Aug 2008) $
*/
public class ReferenceTypeHelper implements TypeHelper {

    public java.lang.Object read(TypeTreeNode node, InputStream is) {
        Object reference = is.read_Object();
        return (java.lang.Object)InterfaceInstanceCreator.createInstance(reference, node.getJavaClass());
    }
View Full Code Here


            handleException(e);
        }
    }

    public Object lookup(String uri) throws CorbaHostException {
        Object result = null;
        try {
            CorbanameURL url = new CorbanameURL(uri);
            NamingContextExt context = getNamingContext(url.getNameService());
            result = context.resolve_str(url.getName());
        } catch (Exception e) {
View Full Code Here

            handleException(e);
        }
    }

    public Object lookup(String uri) throws CorbaHostException {
        Object result = null;
        try {
            CorbanameURL url = new CorbanameURL(uri);
            ORB orb = createORB(url.getHost(), url.getPort(), false);
            NamingContextExt context = getNamingContext(orb, url.getNameService());
            result = context.resolve_str(url.getName());
View Full Code Here

    /**
     * Binds servant implementation to name
     */
    private void bindServant(DynaCorbaServant servant, String name) {
        try {
            Object nameService = orb.resolve_initial_references("NameService");
            NamingContext namingContext = NamingContextHelper.narrow(nameService);

            NameComponent nc = new NameComponent(name, "");
            NameComponent[] path = new NameComponent[] {nc};
            namingContext.rebind(path, servant);
View Full Code Here

            InvocationProxy proxy = new ComponentInvocationProxy((RuntimeEndpoint) service.getEndpoints().get(0), javaClass);
            DynaCorbaServant servant = new DynaCorbaServant(proxy, Utils.getTypeId(javaClass));
            String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests:1.0"};
            servant.setIds(ids);
            bindServant(servant, "ArraysUnions");
            Object reference = bindReference("ArraysUnions");
            ArraysUnionsTests objRef = ArraysUnionsTestsHelper.narrow(reference);
            String[][] stringArray = {{"Hello", "World"}, {"Hi", "Again"}};
            String[][] result = objRef.passStringArray(stringArray);
            for (int i = 0; i < stringArray.length; i++) {
                for (int j = 0; j < stringArray[i].length; j++) {
View Full Code Here

            } catch (Throwable e) {
                e.printStackTrace();
                Assert.fail(e.getMessage());
            }

            Object nameService = orb.resolve_initial_references("NameService");
            NamingContext namingContext = NamingContextHelper.narrow(nameService);

            PrimitivesSetterServant singleSetter = new PrimitivesSetterServant();
            ArraysSetterServant arraysSetter = new ArraysSetterServant();
            TestObjectServant complexObject = new TestObjectServant();
View Full Code Here

            handleException(e);
        }
    }

    public Object lookup(String uri) throws CorbaHostException {
        Object result = null;
        try {
            CorbanameURL url = new CorbanameURL(uri);
            NamingContextExt context = getNamingContext(url.getNameService());
            result = context.resolve_str(url.getName());
        } catch (Exception e) {
View Full Code Here

* @version $Rev: 697647 $ $Date: 2008-09-21 17:52:08 -0700 (Sun, 21 Sep 2008) $
*/
public class ReferenceTypeHelper implements TypeHelper {

    public java.lang.Object read(TypeTreeNode node, InputStream is) {
        Object reference = is.read_Object();
        return (java.lang.Object)InterfaceInstanceCreator.createInstance(reference, node.getJavaClass());
    }
View Full Code Here

public class Client {
    static int run(ORB orb, String[] args) throws UserException {
 
        // Get "hello" object
  Object obj = orb.string_to_object("corbaloc::localhost:40000/hw");
  if(obj == null) {
      System.err.println("Client: Could not resolve target object");
      return 1;
  }
View Full Code Here

public class Client {
    static int run(ORB orb, String[] args) throws UserException {
       
        // Get "hello" object
        Object obj = orb.string_to_object("corbaloc::localhost:40000/hw");
        if(obj == null) {
            System.err.println("Client: Could not resolve target object");
            return 1;
        }
View Full Code Here

TOP

Related Classes of org.omg.CORBA.Object

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.