File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes meaning of factory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "meaning of factory" Watch "meaning of factory" New topic

meaning of factory

Steven Alvarez
Ranch Hand

Joined: Nov 01, 2006
Posts: 66
what are the meaning of the following code?

If you could explain what each line does, that would be cool. Thanks!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
It's hard to know how to answer you without some more information. Is it the Java constructs you're not clear on? do you already understand Java pretty well but want more information about what this particular socket code is accomplishing? Are you familiar with sockets and what they do?
[ March 31, 2007: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
Steven Alvarez
Ranch Hand

Joined: Nov 01, 2006
Posts: 66
I have some idea of what a socket does. I was just was wondering what is a ssl "factory"?
Henry Wong

Joined: Sep 28, 2004
Posts: 20521

Originally posted by Steven Alvarez:
I was just was wondering what is a ssl "factory"?

A "factory" is a sort of Design Pattern -- used to handle the creation of objects. This is needed because there may be some special handling that is needed in addition to just using the "new" operator.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
pete stein

Joined: Feb 23, 2007
Posts: 1561
Are you familiar with design patterns and in particular, the factory method design pattern? I'm just learning about them now and find them fascinating. A useful book if you are somewhat new to all this like me is the "Head First Design Patterns". The most famous and seminal book on this subject is "Design Patterns" by "the Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides).

A decent web page on this can be found here.
I agree. Here's the link:
subject: meaning of factory
It's not a secret anymore!