Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Interceptors???

Options
  • 11-01-2005 5:50pm
    #1
    Registered Users Posts: 4,222 ✭✭✭


    Can anyone point me to a good resource for programmng interseptors through java?
    Need some info on the bsic concepts behind them as well as code examples.

    Ta!


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Whats an interseptor?


  • Registered Users Posts: 4,222 ✭✭✭Scruff


    as far as i can tell its an object that listens on a port and "intercepts" incoming traffic, does some processing and passes out the result\modified traffic to another process.


  • Registered Users Posts: 950 ✭✭✭jessy


    Never herd of an interseptor. Sounds like a cross between a Firewall and a packet Sniffer.


  • Registered Users Posts: 173 ✭✭happydude13


    I think what you are referring to is an 'interceptor'

    Perhaps as in the Pattern,

    or in simple terms, a way of doing something.

    A high level software engineering concept to promote

    the re use of ideas etc..


  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    Could you write some kind of minimal debugger, and then set breakpoints
    on calls to socket functions?..then as you say "intercept"
    the data, before continuing execution where the data will be processed
    by the main application.

    I don't know enough about java, but this is what i'm thinking might work.


  • Advertisement
  • Closed Accounts Posts: 3,357 ✭✭✭secret_squirrel


    Not a java programmer but that sounds like what I would call a 'listener' it listens to traffic arriving on a particular port - analyses it then passed it on to a backend.

    Fundamental part of any client-server app. Would have thought you could get them as prepackaged components theses days. Definately sounds like a case of re-inventing the wheel to me.

    Code reuse is everything. Just remember to avoid giving Kanagaroos SAM's. :)


  • Closed Accounts Posts: 423 ✭✭Dizz


    Interceptors - essential for enterprise apps. Read up on how EJB's implement transparent security, transactions - they use an interceptor design pattern to implement the addition/removal of such services.
    Have a read on Axis handlers - handlers are akin to interceptors - see http://archive.devx.com/java/wrox/7159_chap04.pdf (free chapter)
    CORBA also uses interceptors to implement security services - look about on omg.org if you don't mind a crappy layout.
    Googling on the above terms will yield lots of info you can grok.

    The chain of responsibility design pattern is very much similar to an interceptor design and pretty much implements it. (http://www.javaworld.com/javaworld/jw-08-2003/jw-0829-designpatterns.html)

    Most basic dea behind interceptors...
    void doIt(){

    pre_security_check();
    do_bank_xa();
    post_security_check();
    }

    HTH

    Dizz


Advertisement