This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "meaning of factory" Watch "meaning of factory" New topic
Author

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 ]

Merrill
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
author
Sheriff

Joined: Sep 28, 2004
Posts: 18546
    
  40

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.

Henry


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

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: meaning of factory
 
Similar Threads
Opened a socket with ssl. isConnected returns true. But when sending data get 403
Accessing the URL
SSL and client certificates
going mad about HttpsURLConnection
Accessing a directory on a secure site