Package com.sun.corba.se.spi.servicecontext

Examples of com.sun.corba.se.spi.servicecontext.ServiceContextData


    public void register( Class cls )
    {
        if (ORB.ORBInitDebug)
            dprint( "Registering service context class " + cls ) ;

        ServiceContextData scd = new ServiceContextData( cls ) ;

        if (findServiceContextData(scd.getId()) == null)
            scCollection.addElement( scd ) ;
        else
            throw new BAD_PARAM( "Tried to register duplicate service context" ) ;
    }
View Full Code Here


        if (ORB.ORBInitDebug)
            dprint( "Searching registry for service context id " + scId ) ;

        Enumeration enumeration = scCollection.elements() ;
        while (enumeration.hasMoreElements()) {
            ServiceContextData scd =
                (ServiceContextData)(enumeration.nextElement()) ;
            if (scd.getId() == scId) {
                if (ORB.ORBInitDebug)
                    dprint( "Service context data found: " + scd ) ;

                return scd ;
            }
View Full Code Here

     */
    private ServiceContext unmarshal(Integer scId, byte[] data) {

        ServiceContextRegistry scr = orb.getServiceContextRegistry();

        ServiceContextData scd = scr.findServiceContextData(scId.intValue());
        ServiceContext sc = null;

        if (scd == null) {
            if (orb.serviceContextDebugFlag) {
                dprint("Could not find ServiceContextData for "
                       + scId
                       + " using UnknownServiceContext");
            }

            sc = new UnknownServiceContext(scId.intValue(), data);

        } else {

            if (orb.serviceContextDebugFlag) {
                dprint("Found " + scd);
            }

            // REVISIT.  GIOP version should be specified as
            // part of a service context's definition, so should
            // be accessible from ServiceContextData via
            // its ServiceContext implementation class.
            //
            // Since we don't have that, yet, I'm using the GIOP
            // version of the input stream, presuming that someone
            // can't send a service context of a later GIOP
            // version than its stream version.
            //
            // Note:  As of Jan 2001, no standard OMG or Sun service contexts
            // ship wchar data or are defined as using anything but GIOP 1.0 CDR.
            EncapsInputStream eis
                = EncapsInputStreamFactory.newEncapsInputStream(orb,
                                    data,
                                    data.length,
                                    giopVersion,
                                    codeBase);
            eis.consumeEndian();

            // Now the input stream passed to a ServiceContext
            // constructor is already the encapsulation input
            // stream with the endianness read off, so the
            // service context should just unmarshal its own
            // data.
            sc = scd.makeServiceContext(eis, giopVersion);
            if (sc == null)
                throw wrapper.svcctxUnmarshalError(
                    CompletionStatus.COMPLETED_MAYBE);
        }

View Full Code Here

    public void register( Class cls )
    {
  if (ORB.ORBInitDebug)
      dprint( "Registering service context class " + cls ) ;
 
  ServiceContextData scd = new ServiceContextData( cls ) ;

  if (findServiceContextData(scd.getId()) == null)
      scCollection.addElement( scd ) ;
  else
      throw new BAD_PARAM( "Tried to register duplicate service context" ) ;
    }
View Full Code Here

  if (ORB.ORBInitDebug)
      dprint( "Searching registry for service context id " + scId ) ;
 
  Enumeration enumeration = scCollection.elements() ;
  while (enumeration.hasMoreElements()) {
      ServiceContextData scd =
    (ServiceContextData)(enumeration.nextElement()) ;
      if (scd.getId() == scId) {
    if (ORB.ORBInitDebug)
        dprint( "Service context data found: " + scd ) ;

    return scd ;
      }
View Full Code Here

     */
    private ServiceContext unmarshal(Integer scId, byte[] data) {

        ServiceContextRegistry scr = orb.getServiceContextRegistry();

        ServiceContextData scd = scr.findServiceContextData(scId.intValue());
        ServiceContext sc = null;

        if (scd == null) {
            if (orb.serviceContextDebugFlag) {
                dprint("Could not find ServiceContextData for "
                       + scId
                       + " using UnknownServiceContext");
            }

            sc = new UnknownServiceContext(scId.intValue(), data);

        } else {

            if (orb.serviceContextDebugFlag) {
                dprint("Found " + scd);
            }

            // REVISIT.  GIOP version should be specified as
            // part of a service context's definition, so should
            // be accessible from ServiceContextData via
            // its ServiceContext implementation class.
            //
            // Since we don't have that, yet, I'm using the GIOP
            // version of the input stream, presuming that someone
            // can't send a service context of a later GIOP
            // version than its stream version.
            //
            // Note:  As of Jan 2001, no standard OMG or Sun service contexts
            // ship wchar data or are defined as using anything but GIOP 1.0 CDR.
            EncapsInputStream eis
                = new EncapsInputStream(orb,
                                        data,
                                        data.length,
                                        giopVersion,
                                        codeBase);
            eis.consumeEndian();

      // Now the input stream passed to a ServiceContext
      // constructor is already the encapsulation input
      // stream with the endianness read off, so the
      // service context should just unmarshal its own
      // data.
      sc = scd.makeServiceContext(eis, giopVersion);
      if (sc == null)
    throw wrapper.svcctxUnmarshalError(
        CompletionStatus.COMPLETED_MAYBE);
        }

View Full Code Here

    public void register( Class cls )
    {
        if (ORB.ORBInitDebug)
            dprint( "Registering service context class " + cls ) ;

        ServiceContextData scd = new ServiceContextData( cls ) ;

        if (findServiceContextData(scd.getId()) == null)
            scCollection.addElement( scd ) ;
        else
            throw new BAD_PARAM( "Tried to register duplicate service context" ) ;
    }
View Full Code Here

        if (ORB.ORBInitDebug)
            dprint( "Searching registry for service context id " + scId ) ;

        Enumeration enumeration = scCollection.elements() ;
        while (enumeration.hasMoreElements()) {
            ServiceContextData scd =
                (ServiceContextData)(enumeration.nextElement()) ;
            if (scd.getId() == scId) {
                if (ORB.ORBInitDebug)
                    dprint( "Service context data found: " + scd ) ;

                return scd ;
            }
View Full Code Here

     */
    private ServiceContext unmarshal(Integer scId, byte[] data) {

        ServiceContextRegistry scr = orb.getServiceContextRegistry();

        ServiceContextData scd = scr.findServiceContextData(scId.intValue());
        ServiceContext sc = null;

        if (scd == null) {
            if (orb.serviceContextDebugFlag) {
                dprint("Could not find ServiceContextData for "
                       + scId
                       + " using UnknownServiceContext");
            }

            sc = new UnknownServiceContext(scId.intValue(), data);

        } else {

            if (orb.serviceContextDebugFlag) {
                dprint("Found " + scd);
            }

            // REVISIT.  GIOP version should be specified as
            // part of a service context's definition, so should
            // be accessible from ServiceContextData via
            // its ServiceContext implementation class.
            //
            // Since we don't have that, yet, I'm using the GIOP
            // version of the input stream, presuming that someone
            // can't send a service context of a later GIOP
            // version than its stream version.
            //
            // Note:  As of Jan 2001, no standard OMG or Sun service contexts
            // ship wchar data or are defined as using anything but GIOP 1.0 CDR.
            EncapsInputStream eis
                = new EncapsInputStream(orb,
                                        data,
                                        data.length,
                                        giopVersion,
                                        codeBase);
            eis.consumeEndian();

            // Now the input stream passed to a ServiceContext
            // constructor is already the encapsulation input
            // stream with the endianness read off, so the
            // service context should just unmarshal its own
            // data.
            sc = scd.makeServiceContext(eis, giopVersion);
            if (sc == null)
                throw wrapper.svcctxUnmarshalError(
                    CompletionStatus.COMPLETED_MAYBE);
        }

View Full Code Here

TOP

Related Classes of com.sun.corba.se.spi.servicecontext.ServiceContextData

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.