org.ow2.jonas.generators.genbase.archive
Class Client

java.lang.Object
  extended by org.ow2.jonas.generators.genbase.archive.J2EEArchive
      extended by org.ow2.jonas.generators.genbase.archive.Client
All Implemented Interfaces:
Archive, EjbRefModule, WsClient

public class Client
extends J2EEArchive
implements EjbRefModule, WsClient

Client represnets a J2EE Client Archive.

Author:
Guillaume Sauthier

Constructor Summary
Client(Archive archive)
          Create a new Client not contained in Application
Client(Archive archive, Application app)
          Create a new Client contained in Application
 
Method Summary
 void addClasses(File classes)
          add *.class from directory in the archive.
 void close()
          Close this archive
 Application getApplication()
          Returns the container application (can be null).
 Map getDescriptors()
          Returns a Map of name to Document for each modified Descriptor of the archive.
 List getEjbRefDescs()
          Returns the list of ejb-ref elements contained by a module.
 Document getJonasClientDoc()
          Returns the Document of the jonas-client.xml file.
 InputStream getJonasClientInputStream()
          Returns the InputStream of the jonas-client.xml file.
 List getServiceRefDescs()
          Returns the list of service-ref elements contained by a module.
 void initialize()
          Initialize the Archive.
 boolean omit(String name)
          Returns true if filename must be omitted in the archive.
 void setApplication(Application app)
          Set the container application.
 
Methods inherited from class org.ow2.jonas.generators.genbase.archive.J2EEArchive
addDirectory, addDirectoryIn, addFile, addFile, addFileIn, getArchive, getContainedFiles, getI18n, getInputStream, getLogger, getManifest, getModuleClassloader, getName, getRootFile, isDTDsAllowed, isPacked, setArchive, setModuleClassloader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client(Archive archive)
       throws GenBaseException
Create a new Client not contained in Application

Parameters:
archive - the archive file
Throws:
GenBaseException - When Init fails.

Client

public Client(Archive archive,
              Application app)
       throws GenBaseException
Create a new Client contained in Application

Parameters:
archive - the archive file
app - the container Application
Throws:
GenBaseException - When Init fails
Method Detail

setApplication

public void setApplication(Application app)
Set the container application.

Parameters:
app - the container application.

getApplication

public Application getApplication()
Returns the container application (can be null).

Returns:
the container application (can be null).

getServiceRefDescs

public List getServiceRefDescs()
Returns the list of service-ref elements contained by a module.

Specified by:
getServiceRefDescs in interface WsClient
Returns:
the list of service-ref elements contained by a module.

addClasses

public void addClasses(File classes)
add *.class from directory in the archive.

Parameters:
classes - directory with classes.

getDescriptors

public Map getDescriptors()
Returns a Map of name to Document for each modified Descriptor of the archive.

Specified by:
getDescriptors in class J2EEArchive
Returns:
a Map of name to Document

omit

public boolean omit(String name)
Returns true if filename must be omitted in the archive.

Specified by:
omit in class J2EEArchive
Parameters:
name - filename to be tested
Returns:
true if filename must be omitted.

getJonasClientDoc

public Document getJonasClientDoc()
Returns the Document of the jonas-client.xml file.

Returns:
the Document of the jonas-client.xml file.

getJonasClientInputStream

public InputStream getJonasClientInputStream()
                                      throws IOException
Returns the InputStream of the jonas-client.xml file.

Returns:
the InputStream of the jonas-client.xml file.
Throws:
IOException - When InputStream of jonas-client.xml cannot be returned.

initialize

public void initialize()
                throws GenBaseException
Initialize the Archive.

Specified by:
initialize in class J2EEArchive
Throws:
GenBaseException - When initialization fails.

getEjbRefDescs

public List getEjbRefDescs()
Returns the list of ejb-ref elements contained by a module.

Specified by:
getEjbRefDescs in interface EjbRefModule
Returns:
the list of ejb-ref elements contained by a module.

close

public void close()
Close this archive

Specified by:
close in interface Archive
Overrides:
close in class J2EEArchive


Copyright © 2010 OW2 Consortium. All Rights Reserved.