Package org.cip4.jdflib.jmf
Class JMFBuilder
- java.lang.Object
-
- org.cip4.jdflib.jmf.JMFBuilder
-
- All Implemented Interfaces:
java.lang.Cloneable
public class JMFBuilder extends java.lang.Object implements java.lang.Cloneablefactory for creating JMF messages
-
-
Constructor Summary
Constructors Constructor Description JMFBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JDFJMFbuildAbortQueueEntry(java.lang.String queueEntryId)build a JMF AbortQueueEntry commandJDFJMFbuildHoldQueueEntry(java.lang.String queueEntryId)build a JMF HoldQueueEntry commandJDFJMFbuildKnownDevicesQuery(JDFAutoDeviceFilter.EnumDeviceDetails details)build a JMF Knowndevices queryJDFJMFbuildKnownMessagesQuery()build a JMF Knownmessages queryJDFJMFbuildKnownSubscriptionsQuery(java.lang.String url, java.lang.String slaveQEID)build a JMF KnownSubscriptions queryJDFJMFbuildMilestone(java.lang.String milestoneType, java.lang.String jobID)build a JMF Milestone querysignalJDFJMFbuildNewJDFCommand()build a JMFNewJDF queryJDFJMFbuildNewJDFQuery(java.lang.String jobID, java.lang.String jobPartID)build a JMFNewJDF queryJDFJMFbuildNotificationSubscription(java.lang.String subscriberURL)build a JMF Notification subscriptionJDFJMFbuildQueueStatus()build a JMF QueueStatus queryJDFJMFbuildQueueStatusSubscription(java.lang.String subscriberURL)build a JMF QueueStatus queryJDFJMFbuildRemoveQueueEntry(java.lang.String queueEntryId)build a JMF RemoveQueueEntry commandJDFJMFbuildRequestQueueEntry(java.lang.String queueURL, NodeIdentifier nid)build a JMF RequestQueueEntry command
default: JMFFactory.buildRequestQueueEntry(theQueueURL,null)JDFJMFbuildResourceCatalogQuery(java.lang.String resType)build a JMF Resource queryJDFJMFbuildResourceQuery(boolean bExact)build a JMF Status queryJDFJMFbuildResourceSignal(boolean bExact, JDFResourceLink resLink)build a JMF Status queryJDFJMFbuildResourceSubscription(java.lang.String subscriberURL, double repeatTime, int repeatStep, java.lang.String queueEntryID)build a JMF Resource subscriptionJDFJMFbuildResubmitQueueEntry(java.lang.String qeID, java.lang.String url)build a ResubmitQueueEntry messageJDFJMFbuildResumeQueueEntry(java.lang.String queueEntryId)build a JMF ResumeQueueEntry commandJDFJMFbuildReturnQueueEntry(java.lang.String queueEntryId)build a JMF AbortQueueEntry commandJDFJMFbuildShutdownCommand(JDFAutoShutDownCmdParams.EnumShutDownType typ)build a Shutdown messageJDFJMFbuildStatus(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails, JDFAutoStatusQuParams.EnumJobDetails jobDetails)build a JMF Status queryJDFJMFbuildStatusSignal(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails, JDFAutoStatusQuParams.EnumJobDetails jobDetails)build a JMF Status queryJDFJMFbuildStatusSubscription(java.lang.String subscriberURL, double repeatTime, int repeatStep, java.lang.String queueEntryID)build a JMF Status subscriptionJDFJMFbuildStopPersistentChannel(java.lang.String channelID, java.lang.String qeID, java.lang.String url)build a stopPersistentChannelParams messageJDFJMFbuildSubmissionMethodsQuery()build a JMF Knownmessages queryJDFJMFbuildSubmitQueueEntry(java.lang.String returnUrl)build a ResubmitQueueEntry messageJDFJMFbuildSubmitQueueEntry(java.lang.String returnUrl, java.lang.String submitURL)build a ResubmitQueueEntry messageJDFJMFbuildSuspendQueueEntry(java.lang.String queueEntryId)build a JMF SuspendQueueEntry commandJMFBuilderclone()JDFJMFcreateJMF(JDFMessage.EnumFamily family, JDFMessage.EnumType typ)create a JMF that has all builder specific details filled inJDFJMF[]createSubscriptions(java.lang.String url, java.lang.String queueEntryID, double repeatTime, int repeatStep)create a set of default subscriptionsjava.lang.StringgetAcknowledgeURL()java.lang.StringgetAgentName()java.lang.StringgetAgentVersion()java.lang.StringgetSenderID()get the SenderId used for this builderJDFJMFnewJMF(JDFMessage.EnumFamily family, java.lang.String type)create a new jmf message with some heuristic parametersvoidsetAcknowledgeURL(java.lang.String acknowledgeURL)voidsetAgentName(java.lang.String agentName)voidsetAgentVersion(java.lang.String agentVersion)voidsetSenderID(java.lang.String senderID)set the SenderId used for this builderjava.lang.StringtoString()
-
-
-
Method Detail
-
getAcknowledgeURL
public java.lang.String getAcknowledgeURL()
- Returns:
- the acknowledgeURL
-
setAcknowledgeURL
public void setAcknowledgeURL(java.lang.String acknowledgeURL)
- Parameters:
acknowledgeURL- the acknowledgeURL to set
-
buildSuspendQueueEntry
public JDFJMF buildSuspendQueueEntry(java.lang.String queueEntryId)
build a JMF SuspendQueueEntry command- Parameters:
queueEntryId- queue entry ID of the queue to suspend- Returns:
- the message
-
buildHoldQueueEntry
public JDFJMF buildHoldQueueEntry(java.lang.String queueEntryId)
build a JMF HoldQueueEntry command- Parameters:
queueEntryId- queue entry ID of the queue to hold- Returns:
- the message
-
buildResumeQueueEntry
public JDFJMF buildResumeQueueEntry(java.lang.String queueEntryId)
build a JMF ResumeQueueEntry command- Parameters:
queueEntryId- queue entry ID of the queue to resume- Returns:
- the message
-
buildAbortQueueEntry
public JDFJMF buildAbortQueueEntry(java.lang.String queueEntryId)
build a JMF AbortQueueEntry command- Parameters:
queueEntryId- queue entry ID of the queue to abort- Returns:
- the message
-
buildReturnQueueEntry
public JDFJMF buildReturnQueueEntry(java.lang.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(java.lang.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 detailsjobDetails- 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 trueresLink-- Returns:
- the message
-
buildStatusSignal
public JDFJMF buildStatusSignal(JDFAutoStatusQuParams.EnumDeviceDetails deviceDetails, JDFAutoStatusQuParams.EnumJobDetails jobDetails)
build a JMF Status query- Parameters:
deviceDetails- the device detailsjobDetails- the status details- Returns:
- the message
-
buildStatusSubscription
public JDFJMF buildStatusSubscription(java.lang.String subscriberURL, double repeatTime, int repeatStep, java.lang.String queueEntryID)
build a JMF Status subscription- Parameters:
subscriberURL-repeatTime-repeatStep-queueEntryID-- Returns:
- the message
-
buildResourceSubscription
public JDFJMF buildResourceSubscription(java.lang.String subscriberURL, double repeatTime, int repeatStep, java.lang.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(java.lang.String resType)
build a JMF Resource query- Parameters:
resType- type of resource to query, e.g. Media- Returns:
- the message
-
buildMilestone
public JDFJMF buildMilestone(java.lang.String milestoneType, java.lang.String jobID)
build a JMF Milestone querysignal- Parameters:
milestoneType- the milestone typejobID- the jobID- Returns:
- the message
-
buildKnownSubscriptionsQuery
public JDFJMF buildKnownSubscriptionsQuery(java.lang.String url, java.lang.String slaveQEID)
build a JMF KnownSubscriptions query- Parameters:
url- the url of the subscription - typically the sender of the messageslaveQEID- the queuentryID at the slave- Returns:
- the message
-
buildSubmissionMethodsQuery
public JDFJMF buildSubmissionMethodsQuery()
build a JMF Knownmessages query- Returns:
- the message
-
buildSubmitQueueEntry
public JDFJMF buildSubmitQueueEntry(java.lang.String returnUrl)
build a ResubmitQueueEntry message- Parameters:
returnUrl- the url of the jdf to send back to- Returns:
- the jmf
-
buildSubmitQueueEntry
public JDFJMF buildSubmitQueueEntry(java.lang.String returnUrl, java.lang.String submitURL)
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(java.lang.String jobID, java.lang.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(java.lang.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(java.lang.String subscriberURL)
build a JMF QueueStatus query- Parameters:
subscriberURL-- Returns:
- the message
-
buildRequestQueueEntry
public JDFJMF buildRequestQueueEntry(java.lang.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(java.lang.String url, java.lang.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(java.lang.String qeID, java.lang.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(java.lang.String channelID, java.lang.String qeID, java.lang.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, java.lang.String type)
create a new jmf message with some heuristic parameters- Parameters:
family-type-- Returns:
-
getSenderID
public java.lang.String getSenderID()
get the SenderId used for this builder- Returns:
-
setSenderID
public void setSenderID(java.lang.String senderID)
set the SenderId used for this builder- Parameters:
senderID- the new default senderID, if null use the static default fromJDFJMF
-
clone
public JMFBuilder clone()
- Overrides:
clonein classjava.lang.Object- See Also:
Object.clone()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
getAgentName
public java.lang.String getAgentName()
- Returns:
-
setAgentName
public void setAgentName(java.lang.String agentName)
- Parameters:
agentName-
-
getAgentVersion
public java.lang.String getAgentVersion()
- Returns:
-
setAgentVersion
public void setAgentVersion(java.lang.String agentVersion)
- Parameters:
agentVersion-
-
-