org.cip4.jdflib.jmf
Class JMFBuilder

java.lang.Object
  extended by org.cip4.jdflib.jmf.JMFBuilder

public class JMFBuilder
extends Object

factory for creating JMF messages

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG June 20, 2009 split off from JMFFactory

Constructor Summary
JMFBuilder()
           
 
Method Summary
 JDFJMF buildAbortQueueEntry(String queueEntryId)
          build a JMF AbortQueueEntry command
 JDFJMF buildHoldQueueEntry(String queueEntryId)
          build a JMF HoldQueueEntry command
 JDFJMF buildKnownDevicesQuery(JDFAutoDeviceFilter.EnumDeviceDetails details)
          build a JMF Knowndevices query
 JDFJMF buildKnownMessagesQuery()
          build a JMF Knownmessages query
 JDFJMF buildKnownSubscriptionsQuery(String url, String slaveQEID)
          build a JMF KnownSubscriptions query
 JDFJMF buildMilestone(String milestoneType, String jobID)
          build a JMF Milestone querysignal
 JDFJMF buildNewJDFCommand()
          build a JMFNewJDF query
 JDFJMF buildNewJDFQuery(String jobID, String jobPartID)
          build a JMFNewJDF query
 JDFJMF buildNotificationSubscription(String subscriberURL)
          build a JMF Notification subscription
 JDFJMF buildQueueStatus()
          build a JMF QueueStatus query
 JDFJMF buildQueueStatusSubscription(String subscriberURL)
          build a JMF QueueStatus query
 JDFJMF buildRemoveQueueEntry(String queueEntryId)
          build a JMF RemoveQueueEntry command
 JDFJMF buildRequestQueueEntry(String queueURL, NodeIdentifier nid)
          build a JMF RequestQueueEntry command
default: JMFFactory.buildRequestQueueEntry(theQueueURL,null)
 JDFJMF buildResourceCatalogQuery(String resType)
          build a JMF Resource query
 JDFJMF buildResourceQuery(boolean bExact)
          build a JMF Status query
 JDFJMF buildResourceSignal(boolean bExact, JDFResourceLink resLink)
          build a JMF Status query
 JDFJMF buildResourceSubscription(String subscriberURL, double repeatTime, int repeatStep, String queueEntryID)
          build a JMF Resource subscription
 JDFJMF buildResubmitQueueEntry(String qeID, String url)
          build a ResubmitQueueEntry message
 JDFJMF buildResumeQueueEntry(String queueEntryId)
          build a JMF ResumeQueueEntry command
 JDFJMF buildReturnQueueEntry(String queueEntryId)
          build a JMF AbortQueueEntry command
 JDFJMF buildShutdownCommand(JDFAutoShutDownCmdParams.EnumShutDownType typ)
          build a Shutdown message
 JDFJMF buildStatus(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails, JDFAutoStatusQuParams.EnumJobDetails jobDetails)
          build a JMF Status query
 JDFJMF buildStatusSignal(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails, JDFAutoStatusQuParams.EnumJobDetails jobDetails)
          build a JMF Status query
 JDFJMF buildStatusSubscription(String subscriberURL, double repeatTime, int repeatStep, String queueEntryID)
          build a JMF Status subscription
 JDFJMF buildStopPersistentChannel(String channelID, String qeID, String url)
          build a stopPersistentChannelParams message
 JDFJMF buildSubmissionMethodsQuery()
          build a JMF Knownmessages query
 JDFJMF buildSubmitQueueEntry(String returnUrl)
          build a ResubmitQueueEntry message
 JDFJMF buildSuspendQueueEntry(String queueEntryId)
          build a JMF SuspendQueueEntry command
 JMFBuilder clone()
           
 JDFJMF createJMF(JDFMessage.EnumFamily family, JDFMessage.EnumType typ)
          create a JMF that has all builder specific details filled in
 JDFJMF[] createSubscriptions(String url, String queueEntryID, double repeatTime, int repeatStep)
          create a set of default subscriptions
 String getAcknowledgeURL()
           
 String getSenderID()
          get the SenderId used for this builder
 JDFJMF newJMF(JDFMessage.EnumFamily family, String type)
          create a new jmf message with some heuristic parameters
 void setAcknowledgeURL(String acknowledgeURL)
           
 void setSenderID(String senderID)
          set the SenderId used for this builder
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMFBuilder

public JMFBuilder()
Method Detail

getAcknowledgeURL

public String getAcknowledgeURL()
Returns:
the acknowledgeURL

setAcknowledgeURL

public void setAcknowledgeURL(String acknowledgeURL)
Parameters:
acknowledgeURL - the acknowledgeURL to set

buildSuspendQueueEntry

public JDFJMF buildSuspendQueueEntry(String queueEntryId)
build a JMF SuspendQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to suspend
Returns:
the message

buildHoldQueueEntry

public JDFJMF buildHoldQueueEntry(String queueEntryId)
build a JMF HoldQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to hold
Returns:
the message

buildResumeQueueEntry

public JDFJMF buildResumeQueueEntry(String queueEntryId)
build a JMF ResumeQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to resume
Returns:
the message

buildAbortQueueEntry

public JDFJMF buildAbortQueueEntry(String queueEntryId)
build a JMF AbortQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to abort
Returns:
the message

buildReturnQueueEntry

public JDFJMF buildReturnQueueEntry(String queueEntryId)
build a JMF AbortQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to abort
Returns:
the message

createJMF

public JDFJMF createJMF(JDFMessage.EnumFamily family,
                        JDFMessage.EnumType typ)
create a JMF that has all builder specific details filled in

Parameters:
family -
typ -
Returns:

buildRemoveQueueEntry

public JDFJMF buildRemoveQueueEntry(String queueEntryId)
build a JMF RemoveQueueEntry command

Parameters:
queueEntryId - queue entry ID of the queue to remove
Returns:
the message

buildStatus

public JDFJMF buildStatus(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails,
                          JDFAutoStatusQuParams.EnumJobDetails jobDetails)
build a JMF Status query

Parameters:
deviceDetails - the device details
jobDetails - the status details
Returns:
the message

buildResourceQuery

public JDFJMF buildResourceQuery(boolean bExact)
build a JMF Status query

Parameters:
bExact - if true
Returns:
the message

buildResourceSignal

public JDFJMF buildResourceSignal(boolean bExact,
                                  JDFResourceLink resLink)
build a JMF Status query

Parameters:
bExact - if true
resLink -
Returns:
the message

buildStatusSignal

public JDFJMF buildStatusSignal(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails,
                                JDFAutoStatusQuParams.EnumJobDetails jobDetails)
build a JMF Status query

Parameters:
deviceDetails - the device details
jobDetails - the status details
Returns:
the message

buildStatusSubscription

public JDFJMF buildStatusSubscription(String subscriberURL,
                                      double repeatTime,
                                      int repeatStep,
                                      String queueEntryID)
build a JMF Status subscription

Parameters:
subscriberURL -
repeatTime -
repeatStep -
queueEntryID -
Returns:
the message

buildResourceSubscription

public JDFJMF buildResourceSubscription(String subscriberURL,
                                        double repeatTime,
                                        int repeatStep,
                                        String queueEntryID)
build a JMF Resource subscription

Parameters:
subscriberURL -
repeatTime -
repeatStep -
queueEntryID -
Returns:
the message

buildKnownMessagesQuery

public JDFJMF buildKnownMessagesQuery()
build a JMF Knownmessages query

Returns:
the message

buildResourceCatalogQuery

public JDFJMF buildResourceCatalogQuery(String resType)
build a JMF Resource query

Parameters:
resType - type of resource to query, e.g. Media
Returns:
the message

buildMilestone

public JDFJMF buildMilestone(String milestoneType,
                             String jobID)
build a JMF Milestone querysignal

Parameters:
milestoneType - the milestone type
jobID - the jobID
Returns:
the message

buildKnownSubscriptionsQuery

public JDFJMF buildKnownSubscriptionsQuery(String url,
                                           String slaveQEID)
build a JMF KnownSubscriptions query

Parameters:
url - the url of the subscription - typically the sender of the message
slaveQEID - the queuentryID at the slave
Returns:
the message

buildSubmissionMethodsQuery

public JDFJMF buildSubmissionMethodsQuery()
build a JMF Knownmessages query

Returns:
the message

buildSubmitQueueEntry

public JDFJMF buildSubmitQueueEntry(String returnUrl)
build a ResubmitQueueEntry message

Parameters:
returnUrl - the url of the jdf to send back to
Returns:
the jmf

buildKnownDevicesQuery

public JDFJMF buildKnownDevicesQuery(JDFAutoDeviceFilter.EnumDeviceDetails details)
build a JMF Knowndevices query

Parameters:
details -
Returns:
the message

buildNewJDFQuery

public JDFJMF buildNewJDFQuery(String jobID,
                               String jobPartID)
build a JMFNewJDF query

Parameters:
jobID -
jobPartID -
Returns:
the message

buildNewJDFCommand

public JDFJMF buildNewJDFCommand()
build a JMFNewJDF query

Returns:
the message

buildNotificationSubscription

public JDFJMF buildNotificationSubscription(String subscriberURL)
build a JMF Notification subscription

Parameters:
subscriberURL -
Returns:
the message

buildQueueStatus

public JDFJMF buildQueueStatus()
build a JMF QueueStatus query

Returns:
the message

buildQueueStatusSubscription

public JDFJMF buildQueueStatusSubscription(String subscriberURL)
build a JMF QueueStatus query

Parameters:
subscriberURL -
Returns:
the message

buildRequestQueueEntry

public JDFJMF buildRequestQueueEntry(String queueURL,
                                     NodeIdentifier nid)
build a JMF RequestQueueEntry command
default: JMFFactory.buildRequestQueueEntry(theQueueURL,null)

Parameters:
queueURL - the queue URL of the device sending the command ("where do you want your SubmitQE's delivered to?")
nid - the nodeidentifier of the requested qe, default=null
Returns:
the message

createSubscriptions

public JDFJMF[] createSubscriptions(String url,
                                    String queueEntryID,
                                    double repeatTime,
                                    int repeatStep)
create a set of default subscriptions

Parameters:
url -
queueEntryID -
repeatTime -
repeatStep -
Returns:
the array of subscriptions to be sent

buildResubmitQueueEntry

public JDFJMF buildResubmitQueueEntry(String qeID,
                                      String url)
build a ResubmitQueueEntry message

Parameters:
qeID -
url - the url of the jdf to resubmit
Returns:
the jmf

buildShutdownCommand

public JDFJMF buildShutdownCommand(JDFAutoShutDownCmdParams.EnumShutDownType typ)
build a Shutdown message

Parameters:
typ - hard or soft shutdown?
Returns:
the jmf

buildStopPersistentChannel

public JDFJMF buildStopPersistentChannel(String channelID,
                                         String qeID,
                                         String url)
build a stopPersistentChannelParams message

Parameters:
channelID -
qeID -
url - the url of the subscription
Returns:
the jmf

newJMF

public JDFJMF newJMF(JDFMessage.EnumFamily family,
                     String type)
create a new jmf message with some heuristic parameters

Parameters:
family -
type -
Returns:

getSenderID

public String getSenderID()
get the SenderId used for this builder

Returns:

setSenderID

public void setSenderID(String senderID)
set the SenderId used for this builder

Parameters:
senderID - the new default senderID, if null use the static default from JDFJMF

clone

public JMFBuilder clone()
Overrides:
clone in class Object
See Also:
Object.clone()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2013. All Rights Reserved.