Examples of ClientDelegate


Examples of org.apache.geronimo.corba.ClientDelegate

            write_ulong(0);
        } else {
            if (value instanceof LocalObject)
                throw new org.omg.CORBA.MARSHAL("cannot marshal local object");

            ClientDelegate delegate = (ClientDelegate) ((org.omg.CORBA.portable.ObjectImpl) value)
                    ._get_delegate();

            delegate.getInternalIOR().write(this);
        }
    }
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

        }
    }

    public final org.omg.CORBA.Object read_Object() {
        InternalIOR ior = InternalIOR.read(__orb(), this);
        ClientDelegate del = new ClientDelegate(ior);
        ObjectImpl result = new PlainObject();
        result._set_delegate(del);
        return result;
    }
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

  public Object createObject(InternalIOR ior) {
    orb.__checkDestroy();
    if (ior == null)
      return null;
    ClientDelegate delegate = new ClientDelegate(ior);
    PlainObject result = new PlainObject(delegate);
    return result;
  }
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

    if (ior.type_id.length() == 0 && ior.profiles.length == 0)
      return null;

    // construct delegate
    ClientDelegate delegate = new ClientDelegate(orb, ior);

    // construct a PlainObject
    PlainObject result = new PlainObject(delegate);

    return result;
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

    orb.__checkDestroy();

    if (repository_id.length() == 0)
      return null;

    ClientDelegate delegate = new ClientDelegate(orb, poa, oid,
        repository_id, orb.getPolicies());

    PlainObject result = new PlainObject(delegate);

    return result;
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

      nc[i] = new org.omg.CosNaming.NameComponent(names[i], "");
    }

    try {
      ObjectImpl obj = (ObjectImpl) ns.resolve(nc);
      ClientDelegate delegate = (ClientDelegate) obj._get_delegate();

      ior = delegate.getIOR();
    } catch (Exception ex) {
      throw new org.omg.CORBA.BAD_PARAM(ex.getMessage());
    }
  }
View Full Code Here

Examples of org.apache.geronimo.corba.ClientDelegate

      nc[i] = new org.omg.CosNaming.NameComponent(names[i], "");
    }

    try {
      ObjectImpl obj = (ObjectImpl) ns.resolve(nc);
      ClientDelegate delegate = (ClientDelegate) obj._get_delegate();

      ior = delegate.getIOR();
    } catch (org.omg.CosNaming.NamingContextPackage.NotFound ex) {
      throw new org.omg.CORBA.OBJECT_NOT_EXIST(url);

    } catch (org.omg.CORBA.SystemException ex) {
      // ex.printStackTrace ();
View Full Code Here

Examples of org.apache.qpid.transport.ClientDelegate

    {
        if(updateState(State.DOWN, State.ESTABLISHING))
        {
            try
            {
                _qpidConnection.setConnectionDelegate(new ClientDelegate(new ConnectionSettings())
                {
                    protected SaslClient createSaslClient(List<Object> brokerMechs) throws ConnectionException,
                                                                                           SaslException
                    {
                        Map<String,Object> saslProps = new HashMap<String,Object>();
View Full Code Here

Examples of org.apache.qpid.transport.ClientDelegate

        final Condition negotiationComplete = _lock.newCondition();
        closeOk = _lock.newCondition();
        _lock.lock();

        ClientDelegate connectionDelegate = new ClientDelegate()
        {
            private boolean receivedClose = false;
            public SessionDelegate getSessionDelegate()
            {
                return new ClientSessionDelegate();
            }

            public void exception(Throwable t)
            {
                if (_closedListner != null)
                {
                    _closedListner.onClosed(ErrorCode.CONNECTION_ERROR,ErrorCode.CONNECTION_ERROR.getDesc(),t);
                }
                else
                {
                    throw new RuntimeException("connection closed",t);
                }
            }

            public void closed()
            {
                if (_closedListner != null && !this.receivedClose)
                {
                    _closedListner.onClosed(ErrorCode.CONNECTION_ERROR,ErrorCode.CONNECTION_ERROR.getDesc(),null);
                }
            }

            @Override public void connectionCloseOk(Channel context, ConnectionCloseOk struct)
            {
                _lock.lock();
                try
                {
                    closed = true;
                    this.receivedClose = true;
                    closeOk.signalAll();
                }
                finally
                {
                    _lock.unlock();
                }
            }

            @Override public void connectionClose(Channel context, ConnectionClose connectionClose)
            {
                super.connectionClose(context, connectionClose);
                ErrorCode errorCode = ErrorCode.get(connectionClose.getReplyCode().getValue());
                if (_closedListner == null && errorCode != ErrorCode.NO_ERROR)
                {
                    throw new RuntimeException
                        (new QpidException("Server closed the connection: Reason " +
                                           connectionClose.getReplyText(),
                                           errorCode,
                                           null));
                }
                else
                {
                    _closedListner.onClosed(errorCode, connectionClose.getReplyText(),null);
                }

                this.receivedClose = true;
            }
            @Override public void init(Channel ch, ProtocolHeader hdr)
            {
                // TODO: once the merge is done we'll need to update this code
                // for handling 0.8 protocol version type i.e. major=8 and mino
                if (hdr.getMajor() != 0 || hdr.getMinor() != 10)
                {
                    Client.this.header = hdr;
                    _lock.lock();
                    negotiationComplete.signalAll();
                    _lock.unlock();
                }
            }
        };

        connectionDelegate.setCondition(_lock,negotiationComplete);
        connectionDelegate.setUsername(username);
        connectionDelegate.setPassword(password);
        connectionDelegate.setVirtualHost(virtualHost);

        String transport = System.getProperty("transport","io");
        if (transport.equalsIgnoreCase("nio"))
        {
            _logger.info("using NIO Transport");
View Full Code Here

Examples of org.apache.qpid.transport.ClientDelegate

    {
        if(updateState(State.DOWN, State.ESTABLISHING))
        {
            try
            {
                _qpidConnection.setConnectionDelegate(new ClientDelegate(new ConnectionSettings())
                {
                    protected SaslClient createSaslClient(List<Object> brokerMechs) throws ConnectionException,
                                                                                           SaslException
                    {
                        Map<String,Object> saslProps = new HashMap<String,Object>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.