com.gridsystems.nextgrid.api.pom.ref
Class DataHandlerReference

java.lang.Object
  extended by com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport<javax.activation.DataHandler>
      extended by com.gridsystems.nextgrid.api.pom.ref.DataHandlerReference
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, nextgrid.api.pom.Reference<javax.activation.DataHandler>

public class DataHandlerReference
extends ReferenceSupport<javax.activation.DataHandler>

References a DataHandler instance.

Author:
Rodrigo Ruiz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport
LOG
 
Constructor Summary
DataHandlerReference()
          Creates a new instance.
DataHandlerReference(javax.activation.DataHandler dh)
          Creates a new instance.
 
Method Summary
 boolean canCastFrom(java.lang.Class<?> c)
          
 boolean canCastTo(java.lang.Class<?> c)
          
 java.lang.Object castTo(java.lang.Class<?> c)
          
 javax.activation.DataHandler getValue()
          
 java.lang.Class<javax.activation.DataHandler> getValueType()
          
 void setValue(byte[] bytes, java.lang.String contentType)
          Sets the value of this reference.
 void setValue(java.lang.Object obj)
          
 void setValue(java.lang.String name, java.awt.Image image)
          Sets the value of this reference.
 void setValue(java.lang.String name, javax.mail.internet.MimeMultipart part)
          Sets the value of this reference.
 void setValue(java.lang.String name, org.apache.axis.attachments.OctetStream stream)
          Sets the value of this reference.
 void setValue(java.lang.String name, java.lang.String s)
          Sets the value of this reference.
 
Methods inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport
addReader, addWriter, clearLinks, copy, dispose, getReaders, getWriters, isAvailable, readLock, removeReader, removeWriter, reset, setAvailable, waitAvailable, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHandlerReference

public DataHandlerReference()
Creates a new instance.


DataHandlerReference

public DataHandlerReference(javax.activation.DataHandler dh)
Creates a new instance.

Parameters:
dh - Initial value
Method Detail

canCastFrom

public boolean canCastFrom(java.lang.Class<?> c)


canCastTo

public boolean canCastTo(java.lang.Class<?> c)


castTo

public java.lang.Object castTo(java.lang.Class<?> c)


getValue

public javax.activation.DataHandler getValue()


getValueType

public java.lang.Class<javax.activation.DataHandler> getValueType()


setValue

public void setValue(java.lang.Object obj)


setValue

public void setValue(byte[] bytes,
                     java.lang.String contentType)
Sets the value of this reference.

Parameters:
bytes - An array of bytes containing the data
contentType - The MIME content type

setValue

public void setValue(java.lang.String name,
                     java.lang.String s)
Sets the value of this reference.

Parameters:
name - A name for the created data-source
s - Value contents

setValue

public void setValue(java.lang.String name,
                     org.apache.axis.attachments.OctetStream stream)
Sets the value of this reference.

Parameters:
name - A name for the created data-source
stream - Value contents

setValue

public void setValue(java.lang.String name,
                     java.awt.Image image)
Sets the value of this reference.

Parameters:
name - A name for the created data-source
image - Value contents

setValue

public void setValue(java.lang.String name,
                     javax.mail.internet.MimeMultipart part)
Sets the value of this reference.

Parameters:
name - A name for the created data-source
part - Value contents


Copyright © 2006-2008 Grid Systems, S.A.. All Rights Reserved.