use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class FlightInfoMetadataProducer method createFlightInfoFieldList.
@Produces
@Named("flightInfoFieldMetaData")
public List<FieldMetaData> createFlightInfoFieldList() {
List<FieldMetaData> flightFields = new ArrayList<FieldMetaData>();
FieldMetaData flighttime = RfcFactory.eINSTANCE.createFieldMetaData();
flighttime.setName("FLIGHTTIME");
flighttime.setType(DataType.NUM);
flighttime.setByteLength(10);
flighttime.setByteOffset(0);
flighttime.setUnicodeByteLength(20);
flighttime.setUnicodeByteOffset(0);
flightFields.add(flighttime);
FieldMetaData cityfrom = RfcFactory.eINSTANCE.createFieldMetaData();
cityfrom.setName("CITYFROM");
cityfrom.setType(DataType.CHAR);
cityfrom.setByteLength(20);
cityfrom.setByteOffset(10);
cityfrom.setUnicodeByteLength(40);
cityfrom.setUnicodeByteOffset(20);
flightFields.add(cityfrom);
FieldMetaData depdate = RfcFactory.eINSTANCE.createFieldMetaData();
depdate.setName("DEPDATE");
depdate.setType(DataType.DATE);
depdate.setByteLength(8);
depdate.setByteOffset(30);
depdate.setUnicodeByteLength(16);
depdate.setUnicodeByteOffset(60);
flightFields.add(depdate);
FieldMetaData deptime = RfcFactory.eINSTANCE.createFieldMetaData();
deptime.setName("DEPTIME");
deptime.setType(DataType.TIME);
deptime.setByteLength(6);
deptime.setByteOffset(38);
deptime.setUnicodeByteLength(12);
deptime.setUnicodeByteOffset(76);
flightFields.add(deptime);
FieldMetaData cityto = RfcFactory.eINSTANCE.createFieldMetaData();
cityto.setName("CITYTO");
cityto.setType(DataType.CHAR);
cityto.setByteLength(20);
cityto.setByteOffset(44);
cityto.setUnicodeByteLength(40);
cityto.setUnicodeByteOffset(88);
flightFields.add(cityto);
FieldMetaData arrdate = RfcFactory.eINSTANCE.createFieldMetaData();
arrdate.setName("ARRDATE");
arrdate.setType(DataType.DATE);
arrdate.setByteLength(8);
arrdate.setByteOffset(64);
arrdate.setUnicodeByteLength(16);
arrdate.setUnicodeByteOffset(128);
flightFields.add(arrdate);
FieldMetaData arrtime = RfcFactory.eINSTANCE.createFieldMetaData();
arrtime.setName("ARRTIME");
arrtime.setType(DataType.TIME);
arrtime.setByteLength(6);
arrtime.setByteOffset(72);
arrtime.setUnicodeByteLength(12);
arrtime.setUnicodeByteOffset(144);
flightFields.add(arrtime);
return flightFields;
}
use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.
the class ServerMetadataProducer method createNplServerData.
@Produces
@Named("nplServerData")
public ServerData createNplServerData() {
ServerData data = RfcFactory.eINSTANCE.createServerData();
data.setGwhost("nplhost");
data.setGwserv("3342");
data.setProgid("JCO_SERVER");
data.setRepositoryDestination("nplDest");
data.setConnectionCount("2");
data.setTrace("1");
return data;
}
use of javax.enterprise.inject.Produces in project camel by apache.
the class PropertiesConfigurationTest method propertiesComponent.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent propertiesComponent() {
Properties configuration = new Properties();
configuration.put("property", "value");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(configuration);
component.setLocation("classpath:camel1.properties,classpath:camel2.properties");
return component;
}
use of javax.enterprise.inject.Produces in project camel by apache.
the class Jms method sjms.
@Produces
@Named("sjms")
@ApplicationScoped
SjmsComponent sjms() {
SjmsComponent component = new SjmsComponent();
component.setConnectionFactory(new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useShutdownHook=false&broker.useJmx=false"));
component.setConnectionCount(maxConnections);
return component;
}
use of javax.enterprise.inject.Produces in project camel by apache.
the class Application method properties.
@Produces
@ApplicationScoped
@Named("properties")
// "properties" component bean that Camel uses to lookup properties
PropertiesComponent properties(PropertiesParser parser) {
PropertiesComponent component = new PropertiesComponent();
// Use DeltaSpike as configuration source for Camel CDI
component.setPropertiesParser(parser);
return component;
}
Aggregations