org.jboss.test.webservice.attachment
Class AttachmentImpl

java.lang.Object
  extended byorg.jboss.test.webservice.attachment.AttachmentImpl
All Implemented Interfaces:
Attachment (src) , java.rmi.Remote, ServiceLifecycle (src)

public class AttachmentImpl
extends java.lang.Object
implements Attachment (src) , ServiceLifecycle (src)

Service Endpoint for the MIME mapping required by JAXRPC-1.1 image/gif java.awt.Image image/jpeg java.awt.Image text/plain java.lang.String multipart/* javax.mail.internet.MimeMultipart text/xml javax.xml.transform.Source application/xml javax.xml.transform.Source

Since:
Nov 17, 2004

Constructor Summary
AttachmentImpl()
           
 
Method Summary
 void destroy()
          JAX-RPC runtime system ends the lifecycle of a service endpoint instance by invoking the destroy method.
 DataHandler echoHandler(DataHandler mimepart)
           
 javax.xml.transform.Source echoMimeApplicationXML(javax.xml.transform.Source mimepart)
          Service endpoint method for application/xml
 java.lang.Object echoMimeImageGIF(java.lang.Object mimepart)
          Service endpoint method for image/gif
 java.lang.Object echoMimeImageJPEG(java.lang.Object mimepart)
          Service endpoint method for image/jpeg
 java.lang.Object echoMimeMultipart(java.lang.Object mimepart)
          Service endpoint method for multipart/*
 java.lang.Object echoMimeTextPlain(java.lang.Object mimepart)
          Service endpoint method for text/plain
 java.lang.Object echoMimeTextXML(java.lang.Object mimepart)
          Service endpoint method for text/xml
 void init(java.lang.Object context)
          Used for initialization of a service endpoint.
 java.lang.String sendMimeApplicationXML(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for application/xml
 java.lang.String sendMimeImageGIF(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for image/gif
 java.lang.String sendMimeImageJPEG(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for image/jpeg
 java.lang.String sendMimeMultipart(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for multipart/*
 java.lang.String sendMimeTextPlain(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for text/plain
 java.lang.String sendMimeTextXML(java.lang.String message, java.lang.Object mimepart)
          Service endpoint method for text/xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentImpl

public AttachmentImpl()
Method Detail

sendMimeImageGIF

public java.lang.String sendMimeImageGIF(java.lang.String message,
                                         java.lang.Object mimepart)
                                  throws java.rmi.RemoteException
Service endpoint method for image/gif

Specified by:
sendMimeImageGIF in interface Attachment (src)
Throws:
java.rmi.RemoteException

sendMimeImageJPEG

public java.lang.String sendMimeImageJPEG(java.lang.String message,
                                          java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for image/jpeg

Specified by:
sendMimeImageJPEG in interface Attachment (src)
Throws:
java.rmi.RemoteException

sendMimeTextPlain

public java.lang.String sendMimeTextPlain(java.lang.String message,
                                          java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for text/plain

Specified by:
sendMimeTextPlain in interface Attachment (src)
Throws:
java.rmi.RemoteException

sendMimeMultipart

public java.lang.String sendMimeMultipart(java.lang.String message,
                                          java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for multipart/*

Specified by:
sendMimeMultipart in interface Attachment (src)
Throws:
java.rmi.RemoteException

sendMimeTextXML

public java.lang.String sendMimeTextXML(java.lang.String message,
                                        java.lang.Object mimepart)
                                 throws java.rmi.RemoteException
Service endpoint method for text/xml

Specified by:
sendMimeTextXML in interface Attachment (src)
Throws:
java.rmi.RemoteException

sendMimeApplicationXML

public java.lang.String sendMimeApplicationXML(java.lang.String message,
                                               java.lang.Object mimepart)
                                        throws java.rmi.RemoteException
Service endpoint method for application/xml

Specified by:
sendMimeApplicationXML in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeImageGIF

public java.lang.Object echoMimeImageGIF(java.lang.Object mimepart)
                                  throws java.rmi.RemoteException
Service endpoint method for image/gif

Specified by:
echoMimeImageGIF in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeImageJPEG

public java.lang.Object echoMimeImageJPEG(java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for image/jpeg

Specified by:
echoMimeImageJPEG in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeTextPlain

public java.lang.Object echoMimeTextPlain(java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for text/plain

Specified by:
echoMimeTextPlain in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeMultipart

public java.lang.Object echoMimeMultipart(java.lang.Object mimepart)
                                   throws java.rmi.RemoteException
Service endpoint method for multipart/*

Specified by:
echoMimeMultipart in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeTextXML

public java.lang.Object echoMimeTextXML(java.lang.Object mimepart)
                                 throws java.rmi.RemoteException
Service endpoint method for text/xml

Specified by:
echoMimeTextXML in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoMimeApplicationXML

public javax.xml.transform.Source echoMimeApplicationXML(javax.xml.transform.Source mimepart)
                                                  throws java.rmi.RemoteException
Service endpoint method for application/xml

Specified by:
echoMimeApplicationXML in interface Attachment (src)
Throws:
java.rmi.RemoteException

echoHandler

public DataHandler echoHandler(DataHandler mimepart)
                        throws java.rmi.RemoteException
Specified by:
echoHandler in interface Attachment (src)
Throws:
java.rmi.RemoteException

init

public void init(java.lang.Object context)
          throws ServiceException (src) 
Description copied from interface: ServiceLifecycle (src)
Used for initialization of a service endpoint. After a service endpoint instance (an instance of a service endpoint class) is instantiated, the JAX-RPC runtime system invokes the init method. The service endpoint class uses the init method to initialize its configuration and setup access to any external resources. The context parameter in the init method enables the endpoint instance to access the endpoint context provided by the underlying JAX-RPC runtime system. The init method implementation should typecast the context parameter to an appropriate Java type. For service endpoints deployed on a servlet container based JAX-RPC runtime system, the context parameter is of the Java type javax.xml.rpc.server.ServletEndpointContext. The ServletEndpointContext provides an endpoint context maintained by the underlying servlet container based JAX-RPC runtime system

Specified by:
init in interface ServiceLifecycle (src)
Parameters:
context - Endpoint context for a JAX-RPC service endpoint
Throws:
ServiceException (src) - If any error in initialization of the service endpoint; or if any illegal context has been provided in the init method

destroy

public void destroy()
Description copied from interface: ServiceLifecycle (src)
JAX-RPC runtime system ends the lifecycle of a service endpoint instance by invoking the destroy method. The service endpoint releases its resourcesin the implementation of the destroy method.

Specified by:
destroy in interface ServiceLifecycle (src)