当前位置: 首页>>代码示例>>Java>>正文


Java Interaction.execute方法代码示例

本文整理汇总了Java中javax.resource.cci.Interaction.execute方法的典型用法代码示例。如果您正苦于以下问题:Java Interaction.execute方法的具体用法?Java Interaction.execute怎么用?Java Interaction.execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.resource.cci.Interaction的用法示例。


在下文中一共展示了Interaction.execute方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doGet

import javax.resource.cci.Interaction; //导入方法依赖的package包/类
/**
 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
 *      response)
 */
protected void doGet(HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
   try{
      Connection eciConn = cf.getConnection();
      Interaction eciInt = eciConn.createInteraction();
      JavaStringRecord jsr = new JavaStringRecord();
      jsr.setEncoding("IBM-1047");

      // Setup the interactionSpec.
      ECIInteractionSpec eSpec = new ECIInteractionSpec();
      eSpec.setCommareaLength(20);
      eSpec.setReplyLength(20);
      eSpec.setFunctionName("EC01");
      eSpec.setInteractionVerb(ECIInteractionSpec.SYNC_SEND_RECEIVE);
   
      eciInt.execute(eSpec, jsr, jsr);
      response.getWriter().println(jsr.getText().trim());
   } catch (Exception e){
      throw new IOException(e);
   }
   response.flushBuffer();
}
 
开发者ID:crshnburn,项目名称:CICS-TG-Liberty-Sample,代码行数:27,代码来源:JCAServlet.java

示例2: handle

import javax.resource.cci.Interaction; //导入方法依赖的package包/类
@Override
public Message handle(Exchange exchange, Connection conn, Interaction interact) throws Exception {
    StreamableRecord record = new StreamableRecord();
    StreamableRecord outRecord = new StreamableRecord();
    interact.execute(getInteractionSpec(), getMessageComposer(StreamableRecordBindingData.class).decompose(exchange, new StreamableRecordBindingData(record)).getRecord(), outRecord);
    return _composer.compose(new StreamableRecordBindingData(outRecord), exchange);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:8,代码来源:StreamableRecordHandler.java

示例3: handle

import javax.resource.cci.Interaction; //导入方法依赖的package包/类
@Override
public Message handle(Exchange exchange, Connection conn, Interaction interact) throws Exception {
    MappedRecord record = getRecordFactory().createMappedRecord(MappedRecordHandler.class.getName());
    MappedRecord outRecord = (MappedRecord) interact.execute(getInteractionSpec(), getMessageComposer(MappedRecordBindingData.class).decompose(exchange, new MappedRecordBindingData(record)).getRecord());
    return _composer.compose(new MappedRecordBindingData(outRecord), exchange);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:7,代码来源:MappedRecordHandler.java

示例4: handle

import javax.resource.cci.Interaction; //导入方法依赖的package包/类
@Override
public Message handle(Exchange exchange, Connection conn, Interaction interact) throws Exception {
    IndexedRecord record = getRecordFactory().createIndexedRecord(IndexedRecordHandler.class.getName());
    IndexedRecord outRecord = (IndexedRecord) interact.execute(getInteractionSpec(), getMessageComposer(IndexedRecordBindingData.class).decompose(exchange, new IndexedRecordBindingData(record)).getRecord());
    return _composer.compose(new IndexedRecordBindingData(outRecord), exchange);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:7,代码来源:IndexedRecordHandler.java


注:本文中的javax.resource.cci.Interaction.execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。