Interface - Abstract

Hi,
I have few questions in Abstract Interface.
Can we create Abstract Interface with Synchronous mode?
Is Abstract Interface only for BPMs? or where else we use?
How many ABstract Interfaces we need to create for BPM ? and how many we can create like that?
In case of Abstract Interface, any new steps involved in scenarion or do we need to eliminate some steps? (for ex, when IDOC as sender, we no need to create Sender Communication channel)
pls clarify my doubts.
Thanks
Seshu

Hi Seshu,
->Since this is a File->XI->File scenario, only one Business System is required.
->The BS associated to your Software Component used in the Repository.
<b>From the Blog:</b>
<b>Step4-></b>Now <b>create the Comm Channels</b> for sender and reciever adapter in the Business System(in your case BusinessSystem1)you have assigned to your Scenario.
<b>Step5->Create two Reciever Determinations</b>
*BusinessSystem1 to BPM.
->Interface determination has the Abstract interface as inbound interface.
->No reciever aggreement required.
*BPM to BusinessSystem1.
->Interface determination has the inbound interface.
->Reciver agreement has the reciever file communication channel created.
<b>Step6->In sender agreement</b> specify
*BusinessSystem1 in sender service
*The outbound interface in Sender Interface
*The sender file communication channel for communication channel.
Hope This Helps.
Regards,
Jesse.
Message was edited by: Jesse George

Similar Messages

  • Use of interface, abstract

    Hi all
    A simple question, I have been read some books or web sites about the use of interface, abstracts, but I still don't quite get it such as when should we use it, how should we apply it in terms of programming design..
    Can someone teach me or show me some example....
    Thanks!

    user978043 wrote:
    A simple question, I have been read some books or web sites about the use of interface, abstracts, but I still don't quite get it such as when should we use itAlmost always, especially in non-trivial cases.
    how should we apply it in terms of programming design..Jverd's already given you a good example, but just to reinforce it for you: an interface describes the WHAT; a class defines the HOW.
    An abstract class is somewhere between the two, and is often used for 'skeleton implementations' (you may want to Google it), which allow you to build your own concrete (non-abstract) classes very easily.
    Can someone teach me or show me some example.... This one is filched from "Effective Java" and converts an array of any reference type into a fixed-length List:public static final <T> List<T> asList(final T[] array) {
       return new AbstractList<T>() {
          public T get(int index) {
             return array[index];
          public T set(int index, T value) {
             T oldValue = get(index);
             array[index] = value;
             return oldValue;
          public int size() {
             return array.length;
    }In fact it's highly likely that Arrays.asList() does something very similar to the above.
    Given all the neat things that a List can do, it's a pretty powerful bit of code, and only possible because of the existence of AbstractList.
    HIH
    Winston

  • Doubt about interface & abstract

    Hai everybody,
    I am new java technology. I need clear discribtion about interface & abstract.
    Please give some examples and differentiate it.
    i awaiting for your reply
    by
    azhar

    Even Wikipedia has info about this:
    http://en.wikipedia.org/wiki/Interface_%28Java%29
    http://en.wikipedia.org/wiki/Class_%28computer_science
    %29#Abstract_and_concrete_classeswhenever someone asks this question, they don't really want to read about it, they just want someone to tell them the secret rules about when to use an interface and when to use an abstract class. but we're not telling :-)

  • Interfaces, Abstract Classes & Polymorphism

    I have a friend taking a Java course as part of a larger degree program, and she's asked for some help with an assignment. The assignment is as follows:
    This assignment is to write a simple encryption/decryption application.  There will be a single application
    that the user can use to encrypt or decrypt a phrase passed in on the command line, with the user deciding
    which encryption/decryption scheme to use.
    The first scheme is to add 1 to each character that is in the phrase, the other is to subtract 1 from each
    character that is in the phrase.
    To encrypt, you must be able to use the follwing syntax:
    java Crypto encrypt Additive "hello"
    Output:
    "hello" encrypts to: "ifmmmp"
    To decrypt:
    java ca.bcit.cst.comp2256.a###### decrypt Additive "ifmmp"
    Output:
    "ifmmp" decrypts to: "hello"
    Use Additive or Subtractive as the arguments to choose which encryption/decryption to
    use. The problem is, I'm not entirely sure how to use abstract classes and interfaces to do what is being asked. I'm pretty sure I could do the whole program in a single for-loop, but apparently her teacher doesn't want people coming up with their own solutions for the problem. I don't need any code for how to do it, per se, I'm just wondering how one would structure a program like that to include interfaces, polymorphism and abstract classes.
    Anyone have any ideas?

    with the user deciding which encryption/decryption scheme to use.This is the key sentence. encryption/decryption can be done using multiple schemes. The contract for any given scheme can be defined using
    public String encrypt(String input);
    public String decrypt(String input);There can be multiple implementations for these methods, one set for each scheme.
    The contract therefore becomes the interface and each implementation is a concrete implementation of this interface.
    The problem doesn't delve deep into the kind of schemes available. If it does and there is a significant overlap between 2 schemes, an abstract class that takes care of the shared logic among 2 schemes comes into picture.
    Hope this helps!

  • Interfaces / Abstract classes / ResultSets

    I want to set the fetch size of each java.sql.ResultSet throughout my application, in one place. ResultSet is an interface and a ResultSet is returned by a call to PreparedStatement.execute(). So I figured I could implement ResultSet in an abstract class of my own and just override getFetchSize() or put a setFetchSize() in the constructor. Anyway, it seems I get a ClassCastException when casting the ResultSet returned from PreparedStatement.execute() to MyResultSet:
    java.lang.ClassCastException: oracle.jdbc.driver.OracleResultSetImpl
    I've tried having MyResultSet implement oracle.jdbc.driver.OracleResultSet too just in case. But no luck there either. If I try and implement OracleResultSetImpl I'm told it's not public and so can't be accessed from outside the package.
    Can I do this somehow? Or an alternative, simple way?

    I want to set the fetch size of each
    java.sql.ResultSet throughout my application, in one
    place. ResultSet is an interface and a ResultSet is
    returned by a call to PreparedStatement.execute(). So
    I figured I could implement ResultSet in an abstract
    class of my own and just override getFetchSize() or
    put a setFetchSize() in the constructor.Yes, you can.
    Anyway, it
    seems I get a ClassCastException when casting the
    ResultSet returned from PreparedStatement.execute()
    to MyResultSet:Well, you have to re-implement PreparedStatement as well, otherwise of course it won't even know that your class exists, let alone use it.
    Serializabe z = method();
    If I define method() to return a String, it doesn't mean that it'll suddenly return something else simply because I wrote it and it also implements Serializable.
    java.lang.ClassCastException:
    oracle.jdbc.driver.OracleResultSetImplThe object you get is simply not an instance of your class.
    Simple way around: create a wrapper class around the original ResultSet that does what your implementation did.

  • Situation where you are interface & abstract class?

    please let me know if any one knowns answer for the above question

    But my doubt in which situation we r using interface
    and abstarct classesWithout repeating the debates, you should use interfaces to define the contract for developers to use. This is usually done when nothing is known about the concrete implementation but the design is ready. This is also useful when you need to have multiple inheritance.
    Abstract classes are useful when you want to force the implementation of some of the methods onto the developers, rather than everyone having their own implementations. This is preferred when there is some concrete idea of some of the methods in the class while the implementations of the remaining methods can vary with the specialization of the sub-classes.
    You might want to read this:
    http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html

  • Interface & abstract class

    1>whats the basic difference between an interface and an abstract class?
    when should one be using an interface or an abstract class?
    2>whats the difference between method overriding and method overlaoding?
    does both of them has any relation with the instance of te class implementing them?

    http://www.google.com/search?q=java+interface+%22abstract+class%22
    http://www.google.com/search?q=java+method+overloading+overriding

  • Should @Override apply to implementation of interface/abstract methods?

    To me this is a minor but irritating incompatibility between Java 5 and 6. In 5 the @Override annotation only applied when an actual concrete method was overridden. In 6 it also applies when an interface or abstract method is implemented.
    To my mind only the first case is actually overriding. Further the purpose of the @Override, AFAIKS, is to catch errors where you accidentally override a method, or write a method which you expect to override another, but get the signature wrong.
    This kind of error isn't going to happen on implementing a method because you will get a real syntax error.
    If we were going to use annotations to guarantee implementation it should be @Implements

    sabre150 wrote:
    masijade. wrote:
    Having spend some time recently changing from extending abstract classes to implementing interfaces I would hate to have two different annotations!It would be annoying, yes, in that case, but it would still be more "technically" correct to have a different tag. And, if we are going to insist that "newbies" here at least attempt to adhere to standards/procedures/whatever, we should be willing to do the same. ;-)It would be more "technically" correct to have an 'override' key word in the same way as in C# . The annotation approach is used to make up for a deficiency in the language specification. If one applies the KISS principle or the 'principle of least surprise' then just having one annotation makes sense.Okay then, we agree to disagree. But getting even farther away in the "use" of the term as opposed to the "definition" of the term isn't helping to make up for the deficiency in the language.
    Of course, in the practical sense it is better to have one as it is, then, least likely to "break" in a backwards compatability sense (even when it only applies to compilation and not execution).

  • Ordered & unordered arraylist with interface & abstract class

    you can remove this
    Edited by: Taco_John on Mar 9, 2008 7:38 PM

    http://www.google.com/search?q=java+interface+%22abstract+class%22
    http://www.google.com/search?q=java+method+overloading+overriding

  • What is a "Abstract Interface" ?

    According to JavaDoc, <code>HttpSession</code> is described as
    public abstract interface HttpSession.
    What is an "abstract interface" ?

    All interface's are implicitly abstract so declaring an interface abstract is a bit pointless.

  • When should I use abstract classes and when should I use interfaces?

    Can any body tell me in which scenario we use /we go for Interface and which scenario we go for abstract class, because as per my knowledge what ever thing we can do by using Interface that thing can also done through abstract class i mean to say that the
    behavior of the two class.
    And other thing i also want to know that which concept comes first into the programming abstract class or Interface.
    S.K Nayak

    The main differences between an abstract class and an interface:
    Abstract
    An abstract class can contain actual working code (default functionality), and can have either virtual or abstract method.
    An abstract class must be sub-classed and only the sub-classes can be instantiated. Abstract methods must be implemented in the sub-class. Virtual methods may be overridden in the sub-class (although virtual methods typically contain code, you still may
    need/want to override them). A good use for an abstract class is if you want to implement the majority of the functionality that a class will need, but individual sub-classes may need slightly different additional functioality.
    Interface
    An interface only contains the method signatures (method name and parameters), there is no code and it is not a class.
    An interface must be implemented by a class. An interface is not a class and so it cannot be sub-classed. It can only be implemented by a class. When a class implements an interface, it must have code in it for each method in the interface's definition.
    I have a blog post about interfaces:
    http://geek-goddess-bonnie.blogspot.com/2010/06/program-to-interface.html
    (sorry, I have no blog posts specific to abstract classes)
    ~~Bonnie DeWitt [C# MVP]
    http://geek-goddess-bonnie.blogspot.com

  • Dealing with abstract classes and interfaces with XMLBeans

    I'm quite new to XMLBeans and would like some help. I've got things working when
    you are only saving concreate classes as XML, but when it comes to clesses containing
    interfaces I am running into problems.
    I basically have a collection of XY objects (see below) that I want to save as
    XML.
    I want to convert the following java classes to an xml schema:
    public class XY{
    X x;
    Y y;
    public interface X{
    void setA(int a);
    int getA();
    public interface Y{
    void setB(int b);
    int getB();
    public class X1 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class X2 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class Y1 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    public class Y2 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    What would be the best way to convert these to XML Schema? I've looked through
    all the XMLBeans documentation, but it doesn't say anything about dealing with
    interfaces/abstract classes. Is there anywhere else to look?
    Thanks in advance,
    Andrew

    Anurag,
    What I really wanted was a work-around to using substiutionGroups as substitution
    groups are not supported in this release.
    I want to convert the following schema:
    <xsd:complexType name="PublicationType">
    <xsd:sequence>
    <xsd:element name="Title" type="xsd:string"/>
    <xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="Date" type="xsd:gYear"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookType">
    <xsd:complexContent>
    <xsd:extension base="PublicationType" >
    <xsd:sequence>
    <xsd:element name="ISBN" type="xsd:string"/>
    <xsd:element name="Publisher" type="xsd:string"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="MagazineType">
    <xsd:complexContent>
    <xsd:restriction base="PublicationType">
    <xsd:sequence>
    <xsd:element name="Title" type="xsd:string"/>
    <xsd:element name="Date" type="xsd:gYear"/>
    </xsd:sequence>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="Publication" type="PublicationType"/>
    <xsd:element name="Book" substitutionGroup="Publication" type="BookType"/>
    <xsd:element name="Magazine" substitutionGroup="Publication" type="MagazineType"/>
    <xsd:element name="BookStore">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="Publication" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    to produce an XML file like:
    <?xml version="1.0"?>
    <BookStore ¡Ä>
    <Book>
    <Title>Illusions: The Adventures of a Reluctant Messiah</Title>
    <Author>Richard Bach</Author>
    <Date>1977</Date>
    <ISBN>0-440-34319-4</ISBN>
    <Publisher>Dell Publishing Co.</Publisher>
    </Book>
    <Magazine>
    <Title>Natural Health</Title>
    <Date>1999</Date>
    </Magazine>
    <Book>
    <Title>The First and Last Freedom</Title>
    <Author>J. Krishnamurti</Author>
    <Date>1954</Date>
    <ISBN>0-06-064831-7</ISBN>
    <Publisher>Harper & Row</Publisher>
    </Book>
    </BookStore>
    What is the best way to do this without using substitution types?
    Thanks,
    Andrew
    "Anurag" <[email protected]> wrote:
    Andrew,
    Could you please paste/attach a sample of the code you are using to convert
    Java bean classes to XMLBeans?
    In the current release the goal of XMLBeans technology was to convert
    from
    XML Schemas or XML files to XMLBeans. The focus was not towards conversion
    of Java beans to XMLBeans.
    Regards,
    Anurag
    "Andrew" <[email protected]> wrote in message news:[email protected]...
    I'm quite new to XMLBeans and would like some help. I've got thingsworking when
    you are only saving concreate classes as XML, but when it comes toclesses
    containing
    interfaces I am running into problems.
    I basically have a collection of XY objects (see below) that I wantto
    save as
    XML.
    I want to convert the following java classes to an xml schema:
    public class XY{
    X x;
    Y y;
    public interface X{
    void setA(int a);
    int getA();
    public interface Y{
    void setB(int b);
    int getB();
    public class X1 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class X2 implements X{
    void setA(int a);
    int getA();
    //other data to save
    public class Y1 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    public class Y2 implements Y{
    void setB(int b);
    int getB();
    //other data to save
    What would be the best way to convert these to XML Schema? I've lookedthrough
    all the XMLBeans documentation, but it doesn't say anything about dealingwith
    interfaces/abstract classes. Is there anywhere else to look?
    Thanks in advance,
    Andrew

  • Abstract Classes versus Interfaces

    Somebody at work has just made an interesting observation and its bugging me, comments please.
    When I started Java I just used classes (and abstract classes), and didnt bother with Interfaces I understood them to be a way of getting round the lack of MultipleInheritance and it wasnt a problem that concerned me.
    But as time went on I found that sometimes I did want classes that had little in common to provide some additional feature (such as logging), and interfaces were great for this.
    ..so I was happy ..
    During all this time if I want a HashSet I would write code like this
    HashSet dataSet = new HashSet();but then I read that HashSet was an implementation detail and we should be using Interfaces as follows:
    Set dataSet = new HashSet();So whereas before I might have had a class hierachy with an Abstract class at the top , I started slotting in Interfaces above that and viewing the Abstract class as just a convenience to implementing the Interface.
    So which is the right method , originally I saw subclassing object as an 'is a ' relationship and implementing an interface as a 'implements' relationship. But more recently it seems to be turned on its head and implementing an interface is an 'is a' relationship (but supports multiple inheritance)
    Also it seems to be the trouble with this second approach is that anyone can implement an interface, for example I could implement Set,Map and List with one class, the class hierachy is not so helpful .

    Thanks, but the question was alot wider than that,
    the HashSet example was just one part of it.I think it is representative of all the situations that you talk about, which are whether an instantiator should handle the instantiated object by its interface or by its implementation.
    I suppose the question is
    "How do you code model "is a " relationship in java
    through extending a class or creating an interface
    and implementing it"
    MySubClass extends MySuperClass implements MyInterface {}MySubClass is a MySuperClass and a MyInterface. The way that I view it, the "is a" relationship applies to all type inheritance, even for the multiple type inheritance that you can have with interfaces. The "is a" relationship doesn't doesn't have to be a 1:1 mapping. There's no point in thinking about it differently since that's how the language behaves.
    an alternative question is
    "is it correct to mix/match both methods I described
    above"I thought I gave an answer. You said that my answer is not "broad enough." How so? My answer was that handling an object that you instantiate by its interface can reduce the amount of changes you have to make if you change the implementation. You will have to make one change (the line of code that instantiates the object) instead of many. Also, handling it by its interface makes it easier to switch from object A instantiating object B to object A being passed a reference to B and to object A getting its dependencies injected by XML configuration.
    It seems weird to handle an object by its interface if you already know it's implementation, but it's commonly seen and this is why I think it must be used. As I said, it's a small benefit of abstraction.
    The times when you may not want to do this is when the instantiator has to call methods from different interfaces of the object. You can handle it by its interface by casting between the different interfaces you have to work with, or you can just handle it by its implementation, gaining access to all of the object's interfaces.
    Note that everything I explained concerns the type by which the instantiator handles an instantiated object. If a class does not instantiate a certain object, then it almost always should receive it by its interface, unless it's some really common implementation that's never going to change.
    I use interface, abstract class, and base class interchangeably. It's up to you to decide which to use for type inheritance. It's good practice to favor interfaces.

  • ERROR WHILE USING XSLT MAPPING IN INTERFACE MAPPING

    Hi,
      We are using an xslt mapping in our scenario but while i load the XSLT mapping in the interface mapping i get a message :
    Transformer configuration exception occurred when loading XSLT
    sorce interface :outbound and asyncronous.
    mapping : XSLT mapping (imported as a zip file)
    target interface: abstract,asyncronous.
    The xslt runs well in standalone and its well formed and there is no name space issue.
    please help if any one has faced such a situation while using XSLT mapping.
    regards,
    Anirban.

    Hi Anirban
    When you say it runs well <i>standalone</i> what exactly do you mean? Which XSLT processor are you using to run it? There are subtle difference between XSTL processors that can sometimes result in incompatibilities. For instance, I have seen XSLTs run correctly in XMLSpy but incorrectly (or at least slightly differently) in XI.
    Regards,
    Thorsten

  • Interface not found in Recevier Determination

    Hi,
    I am trying find out why I cannot see the interface i created in the IR in ID.  The sceanio is IDOC via HTTP to XI to R/3.
    2 Comm channels are setup, 1) HTTP sender for business service and 2) an IDoc recvier for the R3 system.
    The repository project only conatins a Message Interface (abstract, asyc) created from an imported IDoc structure.
    When I go to create a new receiver or interface determination, I cannot see the interface....am i missing something?

    Hi Butts,
    We use abstarct async Interface when we are using BPM else for sender we have to use <b>Outbound Async</b>. INterface.
    And add this Outbound Async. interface to Business Service.
    And for sender IDOC no need to create Sneder Comm. Channel even Sender aggrement is not required.
    Sachin
    Message was edited by:
            Sachin Dhingra

Maybe you are looking for