下面列出了怎么用org.omg.CORBA.portable.ObjectImpl的API类实例代码及写法,或者点击链接到github查看源代码。
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
/** Given any Tie, return the corresponding object refernce, activating
* the Servant if necessary.
*/
public static org.omg.CORBA.Object activateTie( Tie tie )
{
/** Any implementation of Tie should be either a Servant or an ObjectImpl,
* depending on which style of code generation is used. rmic -iiop by
* default results in an ObjectImpl-based Tie, while rmic -iiop -poa
* results in a Servant-based Tie. Dynamic RMI-IIOP also uses Servant-based
* Ties (see impl.presentation.rmi.ReflectiveTie).
*/
if (tie instanceof ObjectImpl) {
return tie.thisObject() ;
} else if (tie instanceof Servant) {
Servant servant = (Servant)tie ;
return activateServant( servant ) ;
} else {
throw wrapper.badActivateTieCall() ;
}
}
public static void setDelegate( Object stub, Delegate delegate )
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
}
/** This also gets the delegate from a Servant by
* using Servant._this_object()
*/
public static Delegate getDelegate( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getDelegate() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._get_delegate() ;
else if (stub instanceof Tie) {
Tie tie = (Tie)stub ;
org.omg.CORBA.Object ref = activateTie( tie ) ;
return getDelegate( ref ) ;
} else
throw wrapper.getDelegateRequiresStub() ;
}
public static ORB getORB( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getORB() ;
else if (stub instanceof ObjectImpl)
return (ORB)((ObjectImpl)stub)._orb() ;
else
throw wrapper.getOrbRequiresStub() ;
}
public static void connect( Object stub,
ORB orb ) throws java.rmi.RemoteException
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).connect(
(com.sun.corba.se.spi.orb.ORB)orb ) ;
else if (stub instanceof javax.rmi.CORBA.Stub)
((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
else if (stub instanceof ObjectImpl)
orb.connect( (org.omg.CORBA.Object)stub ) ;
else
throw wrapper.connectRequiresStub() ;
}
public static void connect( Object stub,
ORB orb ) throws java.rmi.RemoteException
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).connect(
(com.sun.corba.se.spi.orb.ORB)orb ) ;
else if (stub instanceof javax.rmi.CORBA.Stub)
((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
else if (stub instanceof ObjectImpl)
orb.connect( (org.omg.CORBA.Object)stub ) ;
else
throw wrapper.connectRequiresStub() ;
}
public static void setDelegate( Object stub, Delegate delegate )
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
}
public static OutputStream request( Object stub,
String operation, boolean responseExpected )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).request( operation,
responseExpected ) ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._request( operation,
responseExpected ) ;
else
throw wrapper.requestRequiresStub() ;
}
public static void setDelegate( Object stub, Delegate delegate )
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
}
/** This also gets the delegate from a Servant by
* using Servant._this_object()
*/
public static Delegate getDelegate( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getDelegate() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._get_delegate() ;
else if (stub instanceof Tie) {
Tie tie = (Tie)stub ;
org.omg.CORBA.Object ref = activateTie( tie ) ;
return getDelegate( ref ) ;
} else
throw wrapper.getDelegateRequiresStub() ;
}
public static ORB getORB( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getORB() ;
else if (stub instanceof ObjectImpl)
return (ORB)((ObjectImpl)stub)._orb() ;
else
throw wrapper.getOrbRequiresStub() ;
}
public static String[] getTypeIds( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getTypeIds() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._ids() ;
else
throw wrapper.getTypeIdsRequiresStub() ;
}
public static boolean isLocal( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).isLocal() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._is_local() ;
else
throw wrapper.isLocalRequiresStub() ;
}
public static void setDelegate( Object stub, Delegate delegate )
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
}
/** This also gets the delegate from a Servant by
* using Servant._this_object()
*/
public static Delegate getDelegate( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getDelegate() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._get_delegate() ;
else if (stub instanceof Tie) {
Tie tie = (Tie)stub ;
org.omg.CORBA.Object ref = activateTie( tie ) ;
return getDelegate( ref ) ;
} else
throw wrapper.getDelegateRequiresStub() ;
}
public static ORB getORB( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getORB() ;
else if (stub instanceof ObjectImpl)
return (ORB)((ObjectImpl)stub)._orb() ;
else
throw wrapper.getOrbRequiresStub() ;
}
/** This also gets the delegate from a Servant by
* using Servant._this_object()
*/
public static Delegate getDelegate( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getDelegate() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._get_delegate() ;
else if (stub instanceof Tie) {
Tie tie = (Tie)stub ;
org.omg.CORBA.Object ref = activateTie( tie ) ;
return getDelegate( ref ) ;
} else
throw wrapper.getDelegateRequiresStub() ;
}
public static void connect( Object stub,
ORB orb ) throws java.rmi.RemoteException
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).connect(
(com.sun.corba.se.spi.orb.ORB)orb ) ;
else if (stub instanceof javax.rmi.CORBA.Stub)
((javax.rmi.CORBA.Stub)stub).connect( orb ) ;
else if (stub instanceof ObjectImpl)
orb.connect( (org.omg.CORBA.Object)stub ) ;
else
throw wrapper.connectRequiresStub() ;
}
public static boolean isLocal( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).isLocal() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._is_local() ;
else
throw wrapper.isLocalRequiresStub() ;
}
public static OutputStream request( Object stub,
String operation, boolean responseExpected )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).request( operation,
responseExpected ) ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._request( operation,
responseExpected ) ;
else
throw wrapper.requestRequiresStub() ;
}
public static ORB getORB( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).getORB() ;
else if (stub instanceof ObjectImpl)
return (ORB)((ObjectImpl)stub)._orb() ;
else
throw wrapper.getOrbRequiresStub() ;
}
public static boolean isLocal( Object stub )
{
if (stub instanceof DynamicStub)
return ((DynamicStub)stub).isLocal() ;
else if (stub instanceof ObjectImpl)
return ((ObjectImpl)stub)._is_local() ;
else
throw wrapper.isLocalRequiresStub() ;
}
public static void setDelegate( Object stub, Delegate delegate )
{
if (stub instanceof DynamicStub)
((DynamicStub)stub).setDelegate( delegate ) ;
else if (stub instanceof ObjectImpl)
((ObjectImpl)stub)._set_delegate( delegate ) ;
else
throw wrapper.setDelegateRequiresStub() ;
}