Click here to Skip to main content
15,897,273 members
Home / Discussions / Java
   

Java

 
AnswerWow, That's Hell Pin
Johnny Ess22-Jun-11 7:12
Johnny Ess22-Jun-11 7:12 
AnswerRe: embed an excel sheet into a java GUI Pin
kikeri16-Aug-11 14:08
kikeri16-Aug-11 14:08 
QuestionAdding text to an existing file or create it if not existant Pin
Matjaz-xyz1-Jun-11 21:11
Matjaz-xyz1-Jun-11 21:11 
AnswerRe: Adding text to an existing file or create it if not existant Pin
TorstenH.2-Jun-11 12:59
TorstenH.2-Jun-11 12:59 
AnswerRe: Adding text to an existing file or create it if not existant Pin
lanmingle5-Jun-11 0:03
lanmingle5-Jun-11 0:03 
QuestionSelecting between base class and interface method... Pin
faheemnadeem29-May-11 8:01
faheemnadeem29-May-11 8:01 
AnswerRe: Selecting between base class and interface method... Pin
Luc Pattyn29-May-11 8:40
sitebuilderLuc Pattyn29-May-11 8:40 
GeneralRe: Selecting between base class and interface method... Pin
faheemnadeem29-May-11 9:04
faheemnadeem29-May-11 9:04 
Thanks for the reference link...
But still i am unable to grasp the solution being a novice programmer.
Should i make another interface that links to my "ILamp" interface. And then implement the new one in my worldlamp class.

Ok for a little help here is my current current class structure:
package mw;
import org.mundo.bas.DoILamp;
import org.mundo.bas.ILamp;
import org.mundo.rt.Service;
import org.mundo.rt.Session;
import org.mundo.rt.Signal;

public class worldlamp extends Service implements ILamp {

	// Private member variables
	private String CHANNEL_NAME = ""; 
	private static final String ZONE_NAME = "lan"; 
	private DoILamp doLamp;
	/*
	 * Default Constructor
	 */
	public worldlamp(String ch) { 
		CHANNEL_NAME = ch;
	} 

	/*
	 * Fired on service initialized
	 * @see org.mundo.rt.Service#init()
	 */
	public void init() { 
		try { 
			// Subscribe to channel
			Signal.connect( getSession().subscribe(ZONE_NAME, CHANNEL_NAME), this); 
			// Initialize stub
			doLamp = new DoILamp();
			// connect stub for publishing
			Signal.connect(doLamp, getSession().publish(ZONE_NAME, CHANNEL_NAME)); 
		} catch (Exception x) { 
			x.printStackTrace(); 
		} 
	}

	@Override
	public void setState(boolean b) {
		doLamp.setState(b);
	}
	
	@Override 
	public boolean getState() {
		return doLamp.getState();
	}
}


And the ILamp Interface

package org.mundo.bas;

import org.mundo.rt.ActiveArray;
import org.mundo.rt.ActiveMap;

//@mcRemote(className="org.mundo.bas.ILamp")
public interface ILamp
{
  public void setState(boolean b);
  public boolean getState();
}


I don't have the source for "Service". Its a Jar library.
And i can't change the ILamp interface too... It is generated from a script... so has to stay the same...

Kindly can you please give me a solution to this...
GeneralRe: Selecting between base class and interface method... Pin
faheemnadeem29-May-11 9:05
faheemnadeem29-May-11 9:05 
AnswerRe: Selecting between base class and interface method... Pin
Luc Pattyn29-May-11 9:11
sitebuilderLuc Pattyn29-May-11 9:11 
GeneralRe: Selecting between base class and interface method... Pin
faheemnadeem29-May-11 9:26
faheemnadeem29-May-11 9:26 
AnswerRe: Selecting between base class and interface method... Pin
Luc Pattyn29-May-11 9:34
sitebuilderLuc Pattyn29-May-11 9:34 
GeneralRe: Selecting between base class and interface method... Pin
jschell29-May-11 9:23
jschell29-May-11 9:23 
GeneralRe: Selecting between base class and interface method... Pin
faheemnadeem29-May-11 10:12
faheemnadeem29-May-11 10:12 
GeneralRe: Selecting between base class and interface method... Pin
jschell30-May-11 5:50
jschell30-May-11 5:50 
QuestionImgien Pin
lmgien26-May-11 7:06
lmgien26-May-11 7:06 
JokeRe: Imgien Pin
Gerben Jongerius26-May-11 20:03
Gerben Jongerius26-May-11 20:03 
AnswerRe: Imgien Pin
TorstenH.27-May-11 1:24
TorstenH.27-May-11 1:24 
AnswerRe: Imgien Pin
Thomas Krojer29-May-11 21:53
Thomas Krojer29-May-11 21:53 
AnswerRe: Imgien Pin
Luc Pattyn29-May-11 23:32
sitebuilderLuc Pattyn29-May-11 23:32 
Question**help** Pin
moein136825-May-11 17:39
moein136825-May-11 17:39 
AnswerRe: **help** Pin
David Skelly25-May-11 21:56
David Skelly25-May-11 21:56 
AnswerRe: **help** Pin
Richard MacCutchan25-May-11 22:54
mveRichard MacCutchan25-May-11 22:54 
Questionno main class found Pin
DominoBoy25-May-11 8:14
DominoBoy25-May-11 8:14 
AnswerRe: no main class found PinPopular
Richard MacCutchan25-May-11 10:11
mveRichard MacCutchan25-May-11 10:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.