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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Interceptors???

  • 11-01-2005 4:50pm
    #1
    Registered Users, Registered Users 2 Posts: 4,225 ✭✭✭


    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, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Whats an interseptor?


  • Registered Users, Registered Users 2 Posts: 4,225 ✭✭✭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, Registered Users 2 Posts: 950 ✭✭✭jessy


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


  • Registered Users, Registered Users 2 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