001: /*
002: * DDS (Data Distribution Service) for JacORB
003: *
004: * Copyright (C) 2005 , Ahmed yehdih <ahmed.yehdih@gmail.com>, fouad
005: * allaoui <fouad.allaoui@gmail.com>, Didier Donsez (didier.donsez@ieee.org)
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Library General Public License
009: * as published by the Free Software Foundation; either version 2
010: * of the License, or (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Library General Public License for more details.
016: *
017: * You should have received a copy of the GNU Library General Public
018: * License along with this program; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
020: * 02111-1307, USA.
021: *
022: * Coontact: Ahmed yehdih <ahmed.yehdih@gmail.com>, fouad allaoui
023: * <fouad.allaoui@gmail.com>, Didier Donsez (didier.donsez@ieee.org)
024: * Contributor(s)
025: *
026: **/
027: package demo.dds.dcps.temperaturesample;
028:
029: import org.jacorb.dds.Supplier;
030: import org.omg.dds.DataWriterListener;
031: import org.omg.dds.DataWriterQos;
032: import org.omg.dds.DataWriterQosHolder;
033: import org.omg.dds.InstanceHandleSeqHolder;
034: import org.omg.dds.LivelinessLostStatus;
035: import org.omg.dds.OfferedDeadlineMissedStatus;
036: import org.omg.dds.OfferedIncompatibleQosStatus;
037: import org.omg.dds.PublicationMatchStatus;
038: import org.omg.dds.Publisher;
039: import org.omg.dds.StatusCondition;
040: import org.omg.dds.SubscriptionBuiltinTopicDataHolder;
041: import org.omg.dds.Time_t;
042: import org.omg.dds.Topic;
043:
044: public class MessageDataWriterImpl extends MessageDataWriterPOA {
045:
046: private DataWriterQos qos;
047: private DataWriterListener a_listener;
048: private Publisher PubParent;
049: private Topic topic;
050: org.omg.CORBA.ORB orb;
051: org.omg.PortableServer.POA poa;
052: // put instance of Message in channel event
053: private Supplier _Supplier;
054:
055: /**
056: * @param qos
057: * @param a_listener
058: * @param pubParent
059: * @param topic_name
060: */
061: public MessageDataWriterImpl(DataWriterQos qos,
062: DataWriterListener a_listener, Publisher pubParent,
063: Topic topic, org.omg.CORBA.ORB orb,
064: org.omg.PortableServer.POA poa) {
065: this .orb = orb;
066: this .poa = poa;
067: this .qos = qos;
068: this .a_listener = a_listener;
069: PubParent = pubParent;
070: this .topic = topic;
071: _Supplier = new Supplier(orb, poa);
072: }
073:
074: /**
075: * Not Implemented
076: */
077: public int register(Message instance_data) {
078: return 0;
079: }
080:
081: /**
082: * Not Implemented
083: */
084: public int register_w_timestamp(Message instance_data, int handle,
085: Time_t source_timestamp) {
086: return 0;
087: }
088:
089: /**
090: * Not Implemented
091: */
092: public int unregister(Message instance_data, int handle) {
093: return 0;
094: }
095:
096: /**
097: * Not Implemented
098: */
099: public int unregister_w_timestamp(Message instance_data,
100: int handle, Time_t source_timestamp) {
101: return 0;
102: }
103:
104: /**
105: * Not Implemented
106: */
107: public int write(Message instance_data, int handle) {
108: _Supplier.Write(topic, instance_data);
109: return 0;
110: }
111:
112: /**
113: * Not Implemented
114: */
115: public int write_w_timestamp(Message instance_data, int handle,
116: Time_t source_timestamp) {
117: return 0;
118: }
119:
120: /**
121: * Not Implemented
122: */
123: public int dispose(Message instance_data, int instance_handle) {
124: return 0;
125: }
126:
127: /**
128: * Not Implemented
129: */
130: public int dispose_w_timestamp(Message instance_data,
131: int instance_handle, Time_t source_timestamp) {
132: return 0;
133: }
134:
135: /**
136: * Not Implemented
137: */
138: public int get_key_value(MessageHolder key_holder, int handle) {
139: return 0;
140: }
141:
142: /**
143: * Not Implemented
144: */
145: public int set_qos(DataWriterQos qos) {
146: return 0;
147: }
148:
149: /**
150: * Not Implemented
151: */
152: public void get_qos(DataWriterQosHolder qos) {
153: }
154:
155: /**
156: * Not Implemented
157: */
158: public int set_listener(DataWriterListener a_listener, int mask) {
159: return 0;
160: }
161:
162: /**
163: * Not Implemented
164: */
165: public DataWriterListener get_listener() {
166: return null;
167: }
168:
169: /**
170: * Not Implemented
171: */
172: public Topic get_topic() {
173: return null;
174: }
175:
176: /**
177: * Not Implemented
178: */
179: public Publisher get_publisher() {
180: return PubParent;
181: }
182:
183: /**
184: * Not Implemented
185: */
186: public LivelinessLostStatus get_liveliness_lost_status() {
187: return null;
188: }
189:
190: /**
191: * Not Implemented
192: */
193: public OfferedDeadlineMissedStatus get_offered_deadline_missed_status() {
194: return null;
195: }
196:
197: /**
198: * Not Implemented
199: */
200: public OfferedIncompatibleQosStatus get_offered_incompatible_qos_status() {
201: return null;
202: }
203:
204: /**
205: * Not Implemented
206: */
207: public PublicationMatchStatus get_publication_match_status() {
208: return null;
209: }
210:
211: /**
212: * Not Implemented
213: */
214: public void assert_liveliness() {
215: }
216:
217: /**
218: * Not Implemented
219: */
220: public int get_matched_subscriptions(
221: InstanceHandleSeqHolder subscription_handles) {
222: return 0;
223: }
224:
225: /**
226: * Not Implemented
227: */
228: public int get_matched_subscription_data(
229: SubscriptionBuiltinTopicDataHolder subscription_data,
230: int subscription_handle) {
231: return 0;
232: }
233:
234: /**
235: * Not Implemented
236: */
237: public int enable() {
238: return 0;
239: }
240:
241: /**
242: * Not Implemented
243: */
244: public StatusCondition get_statuscondition() {
245: return null;
246: }
247:
248: /**
249: * Not Implemented
250: */
251: public int get_status_changes() {
252: return 0;
253: }
254:
255: /**
256: * @return Returns the pubParent.
257: */
258: public Publisher getPubParent() {
259: return PubParent;
260: }
261:
262: /**
263: * @return Returns the topic_name.
264: */
265: public Topic getTopic() {
266: return topic;
267: }
268: }
|