本文整理汇总了Java中com.sun.corba.se.spi.orb.Operation类的典型用法代码示例。如果您正苦于以下问题:Java Operation类的具体用法?Java Operation怎么用?Java Operation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Operation类属于com.sun.corba.se.spi.orb包,在下文中一共展示了Operation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeNaming
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private void initializeNaming( ORB orb )
{
LocalResolver localResolver = ResolverDefault.makeLocalResolver() ;
orb.setLocalResolver( localResolver ) ;
Resolver bootResolver = ResolverDefault.makeBootstrapResolver( orb,
orb.getORBData().getORBInitialHost(),
orb.getORBData().getORBInitialPort() ) ;
Operation urlOperation = ResolverDefault.makeINSURLOperation( orb,
bootResolver ) ;
orb.setURLOperation( urlOperation ) ;
Resolver irResolver = ResolverDefault.makeORBInitRefResolver( urlOperation,
orb.getORBData().getORBInitialReferences() ) ;
Resolver dirResolver = ResolverDefault.makeORBDefaultInitRefResolver(
urlOperation, orb.getORBData().getORBDefaultInitialReference() ) ;
Resolver resolver =
ResolverDefault.makeCompositeResolver( localResolver,
ResolverDefault.makeCompositeResolver( irResolver,
ResolverDefault.makeCompositeResolver( dirResolver,
bootResolver ) ) ) ;
orb.setResolver( resolver ) ;
}
示例2: makeUSLOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeUSLOperation()
{
Operation[] siop = { OperationFactory.stringAction(),
OperationFactory.integerAction() } ;
Operation op2 = OperationFactory.sequenceAction( ":", siop ) ;
Operation uslop = new Operation() {
public Object operate( Object value )
{
Object[] values = (Object[])value ;
String type = (String)(values[0]) ;
Integer port = (Integer)(values[1]) ;
return new USLPort( type, port.intValue() ) ;
}
} ;
Operation op3 = OperationFactory.compose( op2, uslop ) ;
Operation listenop = OperationFactory.listAction( ",", op3 ) ;
return listenop ;
}
示例3: makeFSOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeFSOperation() {
Operation fschecker = new Operation() {
public Object operate( Object value )
{
int giopFragmentSize = ((Integer)value).intValue() ;
if (giopFragmentSize < ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE){
throw wrapper.fragmentSizeMinimum( new Integer( giopFragmentSize ),
new Integer( ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE ) ) ;
}
if (giopFragmentSize % ORBConstants.GIOP_FRAGMENT_DIVISOR != 0)
throw wrapper.fragmentSizeDiv( new Integer( giopFragmentSize ),
new Integer( ORBConstants.GIOP_FRAGMENT_DIVISOR ) ) ;
return value ;
}
} ;
Operation result = OperationFactory.compose( OperationFactory.integerAction(),
fschecker ) ;
return result ;
}
示例4: makeGVOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeGVOperation() {
Operation gvHelper = OperationFactory.listAction( ".",
OperationFactory.integerAction() ) ;
Operation gvMain = new Operation() {
public Object operate( Object value )
{
Object[] nums = (Object[])value ;
int major = ((Integer)(nums[0])).intValue() ;
int minor = ((Integer)(nums[1])).intValue() ;
return new GIOPVersion( major, minor ) ;
}
} ;
Operation result = OperationFactory.compose( gvHelper, gvMain );
return result ;
}
示例5: string_to_object
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
/**
* Convert a stringified object reference to the object it represents.
* @param str The stringified object reference.
* @return The unstringified object reference.
*/
public org.omg.CORBA.Object string_to_object(String str)
{
Operation op ;
synchronized (this) {
checkShutdownState();
op = urlOperation ;
}
if (str == null)
throw wrapper.nullParam() ;
synchronized (urlOperationLock) {
org.omg.CORBA.Object obj = (org.omg.CORBA.Object)op.operate( str ) ;
return obj ;
}
}
示例6: ORBDefaultInitRefResolverImpl
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
public ORBDefaultInitRefResolverImpl( Operation urlHandler, String orbDefaultInitRef )
{
this.urlHandler = urlHandler ;
// XXX Validate the URL?
this.orbDefaultInitRef = orbDefaultInitRef ;
}
示例7: ORBInitRefResolverImpl
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
public ORBInitRefResolverImpl( Operation urlHandler, StringPair[] initRefs )
{
this.urlHandler = urlHandler ;
orbInitRefTable = new java.util.HashMap() ;
for( int i = 0; i < initRefs.length ; i++ ) {
StringPair sp = initRefs[i] ;
orbInitRefTable.put( sp.getFirst(), sp.getSecond() ) ;
}
}
示例8: PrefixParserAction
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
public PrefixParserAction( String propertyName,
Operation operation, String fieldName, Class componentType )
{
super( propertyName, true, operation, fieldName ) ;
this.componentType = componentType ;
this.wrapper = ORBUtilSystemException.get(
CORBALogDomains.ORB_LIFECYCLE ) ;
}
示例9: makeParser
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
public PropertyParser makeParser()
{
PropertyParser parser = new PropertyParser() ;
Operation action = OperationFactory.compose(
OperationFactory.suffixAction(),
OperationFactory.classAction()
) ;
parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
action, "userConfigurators", Class.class ) ;
return parser ;
}
示例10: ParserDataBase
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
protected ParserDataBase( String propertyName,
Operation operation, String fieldName, Object defaultValue,
Object testValue )
{
this.propertyName = propertyName ;
this.operation = operation ;
this.fieldName = fieldName ;
this.defaultValue = defaultValue ;
this.testValue = testValue ;
}
示例11: makeTTCPRTOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeTTCPRTOperation()
{
Operation[] fourIop = { OperationFactory.integerAction(),
OperationFactory.integerAction(),
OperationFactory.integerAction(),
OperationFactory.integerAction() } ;
Operation op2 = OperationFactory.sequenceAction( ":", fourIop ) ;
Operation rtOp = new Operation() {
public Object operate(Object value)
{
Object[] values = (Object[])value ;
Integer initialTime = (Integer)(values[0]) ;
Integer maxGIOPHdrTime = (Integer)(values[1]) ;
Integer maxGIOPBodyTime = (Integer)(values[2]) ;
Integer backoffPercent = (Integer)(values[3]) ;
return TransportDefault.makeReadTimeoutsFactory().create(
initialTime.intValue(),
maxGIOPHdrTime.intValue(),
maxGIOPBodyTime.intValue(),
backoffPercent.intValue());
}
} ;
Operation ttcprtOp = OperationFactory.compose(op2, rtOp);
return ttcprtOp;
}
示例12: makeMapOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeMapOperation( final Map map )
{
return new Operation() {
public Object operate( Object value )
{
return map.get( value ) ;
}
} ;
}
示例13: makeBMGROperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeBMGROperation()
{
Map map = new HashMap() ;
map.put( "GROW", new Integer(0) ) ;
map.put( "CLCT", new Integer(1) ) ;
map.put( "STRM", new Integer(2) ) ;
return makeMapOperation( map ) ;
}
示例14: makeLegacySocketFactoryOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeLegacySocketFactoryOperation()
{
Operation sfop = new Operation() {
public Object operate( Object value )
{
String param = (String)value ;
try {
Class<?> legacySocketFactoryClass =
SharedSecrets.getJavaCorbaAccess().loadClass(param);
// For security reasons avoid creating an instance if
// this socket factory class is not one that would fail
// the class cast anyway.
if (com.sun.corba.se.spi.legacy.connection.ORBSocketFactory.class.isAssignableFrom(legacySocketFactoryClass)) {
return legacySocketFactoryClass.newInstance();
} else {
throw wrapper.illegalSocketFactoryType( legacySocketFactoryClass.toString() ) ;
}
} catch (Exception ex) {
// ClassNotFoundException, IllegalAccessException,
// InstantiationException, SecurityException or
// ClassCastException
throw wrapper.badCustomSocketFactory( ex, param ) ;
}
}
} ;
return sfop ;
}
示例15: makeSocketFactoryOperation
import com.sun.corba.se.spi.orb.Operation; //导入依赖的package包/类
private Operation makeSocketFactoryOperation()
{
Operation sfop = new Operation() {
public Object operate( Object value )
{
String param = (String)value ;
try {
Class<?> socketFactoryClass =
SharedSecrets.getJavaCorbaAccess().loadClass(param);
// For security reasons avoid creating an instance if
// this socket factory class is not one that would fail
// the class cast anyway.
if (com.sun.corba.se.spi.transport.ORBSocketFactory.class.isAssignableFrom(socketFactoryClass)) {
return socketFactoryClass.newInstance();
} else {
throw wrapper.illegalSocketFactoryType( socketFactoryClass.toString() ) ;
}
} catch (Exception ex) {
// ClassNotFoundException, IllegalAccessException,
// InstantiationException, SecurityException or
// ClassCastException
throw wrapper.badCustomSocketFactory( ex, param ) ;
}
}
} ;
return sfop ;
}