Implements interface method at the derived class
Hi all.
I have a class (Derived) that extends another class (Base).
In the base class (Base) there is a method f() with its implementation.
In the interface (C) there is also f() method exactlly like in the base class (Base).
The derived class (Derived) is implements the interface (C).
My question is:
Do i have to implement the method f() in the derived class (Derived) ?
My guess is that you probably have to, even if it's just to call the parent's method.
This all sounds pretty sketchy. Why don't you just make the BASE class implement your interface?
Similar Messages
-
Implementation of the hasProperties() method of the Node class
The following snippet of code prints:
false
true
which seems to be a bug.
TextField nameField = new TextField();
System.out.println(nameField.hasProperties());
ObservableMap<Object, Object> props = nameField.getProperties();
System.out.println(nameField.hasProperties());The implementation of the hasProperties() method in the Node class returns true, if the ObservableMap object for storing properties has been created. That is not what is expected from this method. I think, this method should also check if the ObservableMap has any properties.
Can someone confirm that it is a bug?
Thanks
KishoriYou can log it at http://javafx-jira.kenai.com and then, if the developers want to keep it the way it is (which they may for API compatibility purposes), they can at least document it so that a user would know what to expect without writing a test or making a potentially invalid assumption.
-
Getting Bad Type Error when calling a method in the proxy class
Hi,
I have generated the proxy classes from wsdl.
When I am calling the methods in the proxy class from one of external class, I am getting following error.
Can anyone please help me in resolving this issue.
javax.xml.ws.soap.SOAPFaultException: org.xml.sax.SAXException: Bad types (interface javax.xml.soap.SOAPElement -> class com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference) Message being parsed:
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at $Proxy176.find(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at $Proxy173.find(Unknown Source)
at com.xxx.fs.FNServices.findAccountWs(FNServices.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:92)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:74)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:151)
at com.sun.xml.ws.server.sei.EndpointMethodHandlerImpl.invoke(EndpointMethodHandlerImpl.java:268)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:403)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:253)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:171)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
at weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:311)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:336)
at weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:95)
at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Thanks
AnoopHi Vlad,
The service has not been changed since i have generated the proxy.
I tried calling the service from soapUI and I am getting the following error now.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uri="uri:webservice.subscribenet.intraware.com" xmlns:uri1="uri:subscribenet.intraware.com">
<soapenv:Header>
<uri:SessionHeader>
<uri:SessionID>hjkashd9sd90809dskjkds090dsj</uri:SessionID>
</uri:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<uri:Find>
<uri:SubscribeNetObjectReference>
<uri1:ID></uri1:ID>
<uri1:IntrawareID></uri1:IntrawareID>
<uri1:SharePartnerID></uri1:SharePartnerID>
</uri:SubscribeNetObjectReference>
</uri:Find>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>org.xml.sax.SAXException: WSWS3279E: Error: Unable to create JavaBean of type com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference. Missing default constructor? Error was: java.lang.InstantiationException: com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference. Message being parsed:</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Thanks
Anoop -
Overloaded methods in a derived class
Hello to everyone. I'm starting to learn java with the help of "Thinking in Java". I just want something to make it clearer for me.
Suppose I have a base class with a method, and a derived class which overloads the method:
class Base {
void method() {
System.out.println("Base method");
class Derived extends Base {
void method() {
System.out.println("Derived method");
}Now, in another class somewhere I create an instance of Derived:
Derived dv = new Derived();
dv.method();There is no way that I can access the method from the Base class, right? The only way I can do that is through
class Derived extends Base {
void method() {
super();
System.out.println("Derived method");
}As I said, I'm almost sure that this is correct, I just want a confirmation.You can change the class
class Derived extends Base {
void method() {
super.method();
System.out.println("Derived method");
// calls Base.method()
void baseMethod() {
super.method();
} -
Accessing a private variable from a public method of the same class
can anyone please tell me how to access a private variable, declared in a private method from a public method of the same class?
here is the code, i'm trying to get the variable int[][][] grids.
public static int[][] generateS(boolean[][] constraints)
private static int[][][] sudokuGrids()
int[][][] grids; // array of arrays!
grids = new int[][][]
{Are you sure that you want to have everything static here? You're possibly throwing away all the object-oriented goodness that java has to offer.
Anyway, it seems to me that you can't get to that variable because it is buried within a method -- think scoping rules. I think that if you want to get at that variable your program design may be under the weather and may benefit from a significant refactoring in an OOP-manner.
If you need more specific help, then ask away, but give us more information please about what you are trying to accomplish here and how you want to do this. Good luck.
Pete
Edited by: petes1234 on Nov 16, 2007 7:51 PM -
Passing values between methods in the same class
Hi,
How to pass internal tables or values between methods in the same class.
How to check if the internal method in another method is initial or not.
How to see if the method has already been executed.
Thanks.Just declare the internal table as an attribute in the class - that way every method in this class has access to it.
Since any method has access to all class attributes you can easily check if the internal table is initial or not.
I am not aware of any standard functionality if a method has already been executed or not, one way would be to declare a class attribute for each method and set it once the method has been executed. That way every method in that class would know which method has already been executed or not.
Hope that helps,
Michael -
What does the trim() method of the String class do in special cases?
Looking here ( String (Java Platform SE 7 ) ), I understand that the trim() method of the String class "returns a copy of the string, with leading and trailing whitespace omitted", but I don't understand what the last special case involving Unicode characters is exactly.
Looking here ( List of Unicode characters - Wikipedia, the free encyclopedia ), I see that U+0020 is a space character, and I also see the characters that follow the space character (such as the exclamation mark character).
So, I decided to write a small code sample to try and replicate the behaviour that I quoted (from the API documentation of the trim method) in the multi-line comment of this same code sample. Here is the code sample.:
public class TrimTester {
public static void main(String[] args) {
* "Otherwise, let k be the index of the first character in the string whose code
* is greater than '\u0020', and let m be the index of the last character in the
* string whose code is greater than '\u0020'. A new String object is created,
* representing the substring of this string that begins with the character at
* index k and ends with the character at index m-that is, the result of
* this.substring(k, m+1)."
String str = "aa!Hello$bb";
System.out.println(str.trim());
However, what is printed is "aa!Hello$bb" (without the quotes) instead of "!Hello$" (without the quotes).
Any input to help me better understand what is going on would be greatly appreciated!That's not what I was thinking; I was thinking about the special case where the are characters in the String whose Unicode codes are greater than \u0020.
In other words, I was trying to trigger what the following quote talks about.:
Otherwise, let k be the index of the first character in the string whose code is greater than '\u0020', and let m be the index of the last character in the string whose code is greater than '\u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k, m+1).
Basically, shouldn't the String returned be the String that is returned by the String class' substring(3,9+1) method (because the '!' and '$' characters have a Unicode code greater than \u0020)?
It seems to not be the case, but why? -
Are methods in the Graphics class Thread Safe
Can methods from the Graphics class (.e.g. drawImage(), drawString(), ect..) be called from any thread? In other words, can two threads that refer to the same Graphics object step on each other methods calls?
TIA,
DB
Edited by: Darth_Bane on Apr 27, 2009 1:44 PMNo,
They are GUI activities so you should call them from the Swing Thread ( Event Disptach Thread)
Now for the JComponent the following are thread safe:
repaint(), revalidate, invalidate which can be called from any thread.
Also the listener list can be modified from any thread addListenerXX or removeListenerXX where XX is ListenerType
Regards,
Alan Mehio
London, UK -
OK, fair enough.
Look at the ServletConfig class.
c
Purvashada wrote:
>
We had that option. We decided against the
property files as we can get this dynamically.
There has been problems when this property
was set incorrectly at the time of installation.
Are there any api's to get the servername and
port number other than through request object..
--- "Craig V. Conover" <craig.conover@s...> wrote:
So I guess my question is, why do you need a user
request to get this
information?
You should be able to get this info when the
application is started up,
from a props file.
Does this info change from day to day? If not, why
not create a props
file on the machine that the app is running that has
this info?
Then in the servlet's init method, read this prop
file.
Does that work for you? Not sure how a user request
is needed to
determine this? If it is, please explain.
I have used this same technique for database
properties (servername,
instance name, uid, pwd, etc).
On the QA machine was the properties that pointed to
the QA database,
and on the Production machine, the property file
with the same name had
props that pointed to the Production database.
craig
Purvashada wrote:
It is a static data that is same for all theusers.
It is application level data but generateddynamically
to get the server name and the port number the appis
running on..
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
OK, so how does doing this only once help you.
Wouldn't you need to do
this for each individual end user?
I'm not suggesting that this is request scoped,but
maybe session scoped.
If so, then do this in the module servlet's
onNewSession event.
If this is per user, then storing it staticallyis
problematic because
all users will be using the same data which Idon't
think you want.
Let me know if my assumptions are correct.
craig
Purvashada wrote:
Basically, I need to pass the host url/request
url
to
another server which then posts the results
back to this server.
I need to get the host url dynamically.
This is what I am doing in my code to
get the host url..
URL =req.getScheme() + "://" +
req.getServerName()
+
":" + req.getServerPort();
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
Correct, that is a per request event.
Sounds like we need to figure out a newapproach.
Please elaborate on your requirements for
doing
whatever it is you require.
Maybe we can suggest an alternative, orperhaps
reveal that it may not
be necessary after all.
craig
Purvashada wrote:
I had added this code in the
initializeRequestContext(..)
Hoping it would be called once.
It looks like it is called for every
request.
HttpServletRequest req =requestContext.getRequest();
setActionURL(req);
If I add the code in the init() method
how can I get the HttpServletRequest
getRequest()
Thanks
--- "Craig V. Conover"
<craig.conover@s...>
wrote:
cool.
Be careful about how you update this URL
when
you
use setURL method.
The servlets in JATO are the only shared
(Application scope rather than
Request scope like ViewBeans and
Models),
and
that
you could potentially
have sync/multithread issues. You said
you
were
only
updating once at
the start of the App, so you should be
fine.
I
assume you are doing this
from an init method or init event in theservlet
class? If so, no worries.
Also, just to be sure everyone follows,
I am
not
suggesting that you
write syncronize code in the servlets asthis
will
be a potential bottle
neck in your app's scalibility. This is
not
a
JATO
shortcoming as there
are alternatives to do this sort of
coding.
craig
Purvashada wrote:
I made the method static and is
accessible..
--- "Craig V. Conover"<craig.conover@s...>
wrote:
I would assume it is a static
method, so
just
do:
MainAppServletBase.getURL()
right?
If not static, it probably should
be. If
you
feel it
should not be
static, let us know why/what your
requirements
are.
>
=== message truncated ===
To download the latest version of S1AF (JATO), please visit one of the
following locations:
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.htmlOK, fair enough.
Look at the ServletConfig class.
c
Purvashada wrote:
>
We had that option. We decided against the
property files as we can get this dynamically.
There has been problems when this property
was set incorrectly at the time of installation.
Are there any api's to get the servername and
port number other than through request object..
--- "Craig V. Conover" <craig.conover@s...> wrote:
So I guess my question is, why do you need a user
request to get this
information?
You should be able to get this info when the
application is started up,
from a props file.
Does this info change from day to day? If not, why
not create a props
file on the machine that the app is running that has
this info?
Then in the servlet's init method, read this prop
file.
Does that work for you? Not sure how a user request
is needed to
determine this? If it is, please explain.
I have used this same technique for database
properties (servername,
instance name, uid, pwd, etc).
On the QA machine was the properties that pointed to
the QA database,
and on the Production machine, the property file
with the same name had
props that pointed to the Production database.
craig
Purvashada wrote:
It is a static data that is same for all theusers.
It is application level data but generateddynamically
to get the server name and the port number the appis
running on..
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
OK, so how does doing this only once help you.
Wouldn't you need to do
this for each individual end user?
I'm not suggesting that this is request scoped,but
maybe session scoped.
If so, then do this in the module servlet's
onNewSession event.
If this is per user, then storing it staticallyis
problematic because
all users will be using the same data which Idon't
think you want.
Let me know if my assumptions are correct.
craig
Purvashada wrote:
Basically, I need to pass the host url/request
url
to
another server which then posts the results
back to this server.
I need to get the host url dynamically.
This is what I am doing in my code to
get the host url..
URL =req.getScheme() + "://" +
req.getServerName()
+
":" + req.getServerPort();
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
Correct, that is a per request event.
Sounds like we need to figure out a newapproach.
Please elaborate on your requirements for
doing
whatever it is you require.
Maybe we can suggest an alternative, orperhaps
reveal that it may not
be necessary after all.
craig
Purvashada wrote:
I had added this code in the
initializeRequestContext(..)
Hoping it would be called once.
It looks like it is called for every
request.
HttpServletRequest req =requestContext.getRequest();
setActionURL(req);
If I add the code in the init() method
how can I get the HttpServletRequest
getRequest()
Thanks
--- "Craig V. Conover"
<craig.conover@s...>
wrote:
cool.
Be careful about how you update this URL
when
you
use setURL method.
The servlets in JATO are the only shared
(Application scope rather than
Request scope like ViewBeans and
Models),
and
that
you could potentially
have sync/multithread issues. You said
you
were
only
updating once at
the start of the App, so you should be
fine.
I
assume you are doing this
from an init method or init event in theservlet
class? If so, no worries.
Also, just to be sure everyone follows,
I am
not
suggesting that you
write syncronize code in the servlets asthis
will
be a potential bottle
neck in your app's scalibility. This is
not
a
JATO
shortcoming as there
are alternatives to do this sort of
coding.
craig
Purvashada wrote:
I made the method static and is
accessible..
--- "Craig V. Conover"<craig.conover@s...>
wrote:
I would assume it is a static
method, so
just
do:
MainAppServletBase.getURL()
right?
If not static, it probably should
be. If
you
feel it
should not be
static, let us know why/what your
requirements
are.
>
=== message truncated ===
To download the latest version of S1AF (JATO), please visit one of the
following locations:
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.html -
When do we override our own clone method not the Object class clone method
Hi,
I have a confusion in overriding clone method.We can create clone object by writing Object.clone() but some times I have seen writing our own clone method ,when do we write this,also clone() is defined protected and when we write our own clone it is said to write it public,why?
Thanks
Sumitprotected methods can only be called in the same class and it subclass. You can make clone protected if this is all you need.
However if you need to clone() the object from another class, it need to be public.
This is the same for any method.
Also as Object.clone() is protected you cannot make it private or package-local (this is true of any protected method) -
Method is called in the superclass, instead of the derived class
Hello,
I have created a FI workflow for releasing invoices, and a BO called ZSF1FIPP that is derived from FIPP. in ZSF1FIPP I had defined all the methods needed for the workflow, like GET LEVEL.
In all the workflow tasks, the object assigned is ZSF1FIPP.
When I test run the workflow, I get an error like, straight in the first task:
'Method GET LEVEL is not implemented in FIPP'.
That is very puzzling.
The WF was transported from another system, and activated without error in the new system. I have deleted and then recreated the ZSF1FIPP object, with the same result in workflow. If I test the object alone, it works without a glitch.
If you have any clue about this, please advise.
Regards,
AdrianHello,
Thx for answering to my question.
In swo1 I have enterd FIPP and then the button subclass. Then I had filled all the details requested by sap, and created the ZSF1FIPP subclass.
If I ciick the general details button, I cand see FIPP as super class.
Do I have to do some thing else also, to activate the link ?
Regards,
Adi -
Running different set of methods on the same class via threads
Hello all,
I have this issue that I am trying to deal with. It looks pretty simple to me, but maybe just a mental block I guess :)
Now the code below will give you an idea of what I am trying to achieve. I am not sure if its possible or if there is some other better way to do this. Any help will be appreciated.
Thanks
public class TestClass extends Thread{
public TestClass(){
// Assume something goes in here.
public void abc(){
System.out.println("In abc");
public void xyz(){
System.out.println("In xyz");
public void run(){
//What do I put here, since my call is specific.
public static void main(String args[]){
TestClass t1 = new TestClass();
t1.start();// I want t1 to call only abc()
TestClass t2 = new TestClass();
t2.start();// I want t2 to call only xyz
}Edited by: mikkin on Mar 12, 2009 3:00 PMkogose wrote:
you can use the Reflection API to make the desired method an instance variable:Whoa, that's a pretty big case of over-engineering (or under-engineering, depending on how you look at it) and abuse of Reflection. The real problem in the original post is that Thread isn't being used properly. You almost never want to subclass Thread, for reasons like these: your runnable target should be separate from the thread. I would organize your code like this:
public class TestClass {
public TestClass() {
// Assume something goes in here.
public void abc() {
System.out.println("In abc");
public void xyz() {
System.out.println("In xyz");
public static void main(String args[]) {
final TestClass t1 = new TestClass();
final TestClass t2 = new TestClass();
new Thread(new Runnable() {
public void run() { t1.abc(); }
}, "t1Thread").start();
new Thread(new Runnable() {
public void run() { t2.xyz(); }
}, "t2Thread").start();
} -
How does a method extend another method in the same class ??
hi everybody, I want to know if it is possible to have such code as:
void foo(){
// foo process
void bar <<extend>> foo{
//foo process
//bar process
thanks for helping meSince you want different names for each of your so-called "child" methods, then neither overloading nor overriding in a subclass will work as each relies on the same method names. Perhaps the following will suffice:
public class MyClass
//some stuff
private myMethodThatDoesSomeStuff()
//do some stuff that all the other methods must also do
private methodA(int q, byte z)
myMethodThatDoesSomeStuff();
// continue with this method.
private methodL(short v, float g23)
myMethodThatDoesSomeStuff();
// continue with this method.
}If not, you need to do some design work. -
Get method in the Attribute class. in JNDI
I had connected to the AD
// Create the initial directory context
DirContext ctx = new InitialDirContext(env);
Attributes attrs = ctx.getAttribute("DC=DomainDnsZones,DC=testing,DC=local");
but I had no idea wat to get from the attrs.get method.
as in, I don't know what kind of attributes ID are available inside my attrs
is there any coding to get all the attribute ID so tat I can use the get method to retrieve them?We can get the available Attributes for a particular user.....
using Attributes class for a Search and Context....
You can try out the free LDAP viewer available in internet (Its a Applet)... u can find the possible Attribute Names in that... and use the below statement..
Attributes attrs1 = ctx.getAttributes("CN=" + "user,CN=Users,DC=domain,DC=dmn,DC=com");
String office = (String)attrs1.get("physicaldeliveryofficename").get(); -
Why uses the methods in the InputProcessorSupport class
Hi, there
InputProcessorSupport provides some methods you can use to set/retrieve the
name/value to the session scope or request scope. But what are the
differences between them and the traditional Request.setAttribute() and
Session.setAttribute() method? What are the advantages of using these new
API?
Thanks
Coco"coco" <replyto@newsgroup> wrote:
Hi, there
InputProcessorSupport provides some methods you can use to set/retrieve
the
name/value to the session scope or request scope. But what are the
differences between them and the traditional Request.setAttribute() and
Session.setAttribute() method? What are the advantages of using these
new
API?
Thanks
Coco
Maybe you are looking for
-
How to redirect Goods Receipt IM output to a specific printer by user
We currently print a custom Goods Receipt pallet label that we defined as Output Type YE01. The IM printer determintion utilizes the 'by Plant / Storage Location / User Group' option (transaction OMJ4, table TNAD9). When the receipt if for a particu
-
Hello. I am currently running 10.5.4 on my 1.8ghz single processor g5. I just purchased a new mac pro, and I would like to copy my photos from my old iphoto to my new iphoto. (I do not have the new computer set up yet-I would like first get some idea
-
New board for Software Updates - read this first!
Dear Nokia Support Discussions members, we are happy to introduce this new section for discussing Nokia phone software updates with your PC or over-the-air. Please use this board to discuss - Nokia Software Updater PC application or over-the-air upda
-
I have a question about data aqusition from PCI bus
Hi. I am designing a PCI card.I wonder if I want to do some process in LabVIEW,such as power spectrum analyse, oscilloscope, do I have to transfer the data continuously from my card? Thank you.
-
I am making a video player with flash mx 2004, When the control bar/volume slider isn't be used, it goes transparent, but, when it does, or if it has the ability to, and function that have a startDrag function in it, don't work, all the other buttons